690 B
690 B
Overview
Concepts:
- Primitives
- u8, i32, f32, bool, char
- lists, slice, fixed-length array builtin, matrices
- Control flow
- for, while, break
- Structs & tuples
- Let bindings
Ptr a
- Pattern matching
- ADTs
- Mutability
- const by default?
- Functions
- Array syntax
- ranges
arr[1..]
,arr[..3]
- index
arr[4]
- ranges
- Stdlib
- string
- vec/dynarray
- hashtable
- option/result
C-like with Roc syntax. Start with interpreter. Output C later down the track
let slice = &[u32];
[1,23,45,4,1]
let new_vec: Vec<i32> = iterator.iter_mut()
-> map(|x| *x = 100 ) -- allocs?
-> filter -- allocs?
-> filter -- allocs?
.collect()