iter
iter copied to clipboard
Add head function
Would be nice to have a function that fetches the head of an iterable and throws an exception if it's non-empty instead of having to call the current function on an iterator and checking whether it's not null.
@nikic any thoughts on adding this function?
I know this is quite old but the code seems still good. Will it be merged ? Also good idea the head but to match the bash one for example would it be possible to add a number of rows to return ?