are_we_fast_yet/storage.fz
# ported from https://github.com/smarr/are-we-fast-yet/blob/master/benchmarks/Java/src/Storage.java public storage => store(data choice (array store) (array nil)) is count := mut 0 build_tree_depth (depth i32) => count <- count.get + 1 if depth.is_one store (array nil ((random.next_i32 10) + 1) (i -> nil)) else store (array store 4 (i -> build_tree_depth (depth - 1))) say "iterations: {bench (() -> build_tree_depth 7; unit) 1E3}"