iter icon indicating copy to clipboard operation
iter copied to clipboard

Add head function

Open jankramer opened this issue 7 years ago • 2 comments

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.

jankramer avatar Aug 09 '18 06:08 jankramer

@nikic any thoughts on adding this function?

jankramer avatar Aug 10 '18 10:08 jankramer

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 ?

Neirda24 avatar Jun 13 '21 20:06 Neirda24