Skip to content

Standard Library

Compare
Choose a tag to compare
@dcutting dcutting released this 03 Apr 23:23
· 22 commits to master since this release

Some useful functions are now available as part of a standard library, including:

> "abc".length
3

> [1,2,3].reverse
[3,2,1]

> [1,2,3].map(|x| x*2)
[2,4,6]

> [4,6,1,2,2].sort
[1,2,2,4,6]

> 5.cubed
125

> "hello there world".split
["hello", "there", "world"]

> ["a", "b", "c"].join(":")
"a:b:c"