Having three kinds of objects to denote the absence of a value
is a bit retarded, so I removed the one I added. For denoting
the end of a sequence, I added the done property on the
seq function instead. Feels safer anyhow.
Also renamed isNil to isnt and added a converse is
function. Makes it nicer to read code than seeing bangs
everywhere.
Removed lim as well, since it was an odd ball and when nil
disappeared it was tricky to make it work with seq.
I took a cue from Clojure's repeatedly instead, with the
important difference that in this version of repeatedly each
function call will have its index passed.
Added a naive implementation of nth, which probably should
be optimized at some point.
Having three kinds of objects to denote the absence of a value is a bit retarded, so I removed the one I added. For denoting the end of a sequence, I added the
done
property on theseq
function instead. Feels safer anyhow.Also renamed
isNil
toisnt
and added a converseis
function. Makes it nicer to read code than seeing bangs everywhere.Removed
lim
as well, since it was an odd ball and whennil
disappeared it was tricky to make it work withseq
. I took a cue from Clojure'srepeatedly
instead, with the important difference that in this version of repeatedly each function call will have its index passed.Added a naive implementation of
nth
, which probably should be optimized at some point.