on 267f708 help sign in
elk/bench/src/Syntax/Let.elm
37 lines 602 B history raw
1module Syntax.Let (benchmark) where
3import Benchmark exposing (Benchmark, test, suite)
4import String
7benchmark : Benchmark.Benchmark
8benchmark =
9 suite "let expressions"
10 [ test "bind numbers, add them" simpleBindings
11 , test "tuple destructuring" tupleDestructuring
12 , test "record destructuring" recordDestructuring
13 ]
16simpleBindings _ =
17 let
18 x = 3
19 y = 4
20 in
21 x + y
24tupleDestructuring _ =
25 let
26 (x,y) = (3,4)
27 (a,b) = (1,1)
28 in
29 x + y + a + b
32recordDestructuring _ =
33 let
34 {x,y} = { x = 3, y = 4 }
35 {a,b} = { a = 1, b = 1 }
36 in
37 x + y + a + b