Laythe icon indicating copy to clipboard operation
Laythe copied to clipboard

Shorthand for .iter() and .into(<Class>.collect)

Open jonnyboyC opened this issue 2 years ago • 1 comments

Problem

While working on advent of code 2021 I've noticed there is a quite a bit of boilerplate with both .iter() and .into(<Class>.collect). Essentially converting a container too and from an iterator. I'd like to consider add some sort of sugar make this explicit still but shorter.

let a = [1,2, 3]$.map(|x| x).toList()

jonnyboyC avatar Dec 06 '21 13:12 jonnyboyC

I currently have implemented .list() and .tuple(). I should probably a .hash() method.

jonnyboyC avatar Dec 29 '21 18:12 jonnyboyC