-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seq #33
seq #33
Conversation
dfbcee3
to
27e064d
Compare
throw new Error( | ||
"Illegal argument: assoc expects an odd number of arguments." | ||
); | ||
throw new Error('Illegal argument: assoc expects an odd number of arguments.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some of these changes come from prettier reformatting. sorry for the noise. I hope it matches the style intended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem
return x instanceof String || Symbol.iterator in x; | ||
return typeof x === 'string' || x === null || x === undefined || Symbol.iterator in x; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apparently this was totally broken for strings before
I think this is ready for review |
Please answer the following questions and leave the below in as part of your PR.
Related #22
This PR implements the following:
iterable?
toseqable?
and adds support fornil
andjs/undefined
iterable
to return an empty array whennil
orundefined
are passedseq
function which is just likeiterable
but returnsnil
when the iterable is empty.first
,second
andrest
to calliterable
before destructuring.seq
This now allows us to do things like the following: