We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
last(arr, key, val)
The text was updated successfully, but these errors were encountered:
I would prefer to keep last simple.
last
You could use lens for that.
lens
var lens = require('101/lens'); var last = require('101/last'); var lastLens = lens( last, function(val, arr) { var clone = arr.slice(); clone[arr.length-1] = val; return clone; } ); lastLens([1, 2, 3, 4]); // => 4 lastLens.set(6, [1, 2, 3, 4]); // => [1, 2, 3, 6]
Or a new function setLast?
setLast
Sorry, something went wrong.
No branches or pull requests
last(arr, key, val)
The text was updated successfully, but these errors were encountered: