Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

insert-MRU MRU list function (See related posts)

insert-MRU: func [
    "Insert value in series; removing first existing instance."
    series [series!] 
    value 
    /limit size [integer!] "Limit the series to the given size by removing the last item."
][
    remove find/only series value
    insert/only series value
    if all [size  size < length? series] [remove back tail series]
    series
]

You need to create an account or log in to post comments to this site.


Click here to browse all 4863 code snippets

Related Posts