git.iko.soy/rowtype-yoga/purescript-native
on 24fdff2 help sign in
17 lines 450 B history raw
1module Main where
3import Prelude
4import Test.Assert
6main = do
7 assert $ (/ 2.0) 4.0 == 2.0
8 assert $ (2.0 /) 4.0 == 0.5
9 assert $ (`const` 1.0) 2.0 == 2.0
10 assert $ (1.0 `const`) 2.0 == 1.0
11 let foo = { x: 2.0 }
12 assert $ (/ foo.x) 4.0 == 2.0
13 assert $ (foo.x /) 4.0 == 0.5
14 let (//) x y = x.x / y.x
15 assert $ (// foo { x = 4.0 }) { x: 4.0 } == 1.0
16 assert $ (foo { x = 4.0 } //) { x: 4.0 } == 1.0
17 Control.Monad.Eff.Console.log "Done!"