Laythe
Laythe copied to clipboard
Shorthand for .iter() and .into(<Class>.collect)
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()
I currently have implemented .list()
and .tuple()
. I should probably a .hash()
method.