I'm speaking only as a casual user of Pure, but this seems like an odd
question. Pure is very much a programming language of its own.
Replacing the nth element of a list is a one-liner, something like:
replace xs n x = (take (n-1) xs) + (x:(drop n xs));
However, if you often need to do this operation, a list is a very
inefficient data structure because of the need to copy the head of the
list.
I don't see a similar function offered by Haskell, whose standard
library has presumably been labored over by committees for two decades
or so:
https://hackage.haskell.org/package/base-4.10.1.0/docs/Data-List.html
Mike
> --
> You received this message because you are subscribed to the Google Groups
> "pure-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
pure-lang+...@googlegroups.com.
> To post to this group, send email to
pure...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/pure-lang.
> For more options, visit
https://groups.google.com/d/optout.