Idris2/tests/idris2/record004/input

26 lines
654 B
Plaintext
Raw Normal View History

pt.x
pt .x
pt.x + pt.y
(Main.pt).x
(MkPoint pt.y pt.x).y
map (.x) [MkPoint 1.1 2.5, MkPoint 4.2 6.3]
map .x [MkPoint 1 2, MkPoint 3 4]
map (.topLeft.y) [rect, rect]
2020-06-21 09:42:30 +03:00
rect.topLeft.x.add 7
map (.topLeft.x.add 7) [rect, rect]
[1,2,3].oopFoldl 0 $ \x, y => x + y
map (.oopFoldl 0 (+)) [[1,2,3],[4,5,6]]
rect.topLeft.x + rect.bottomRight.y
2020-06-21 01:09:30 +03:00
rect.(x . topLeft) + rect.(y . bottomRight)
x rect.topLeft + y rect.bottomRight
rect.(Rect.topLeft)
Main.Point.x pt
Point.x pt
(x) pt
x pt
(record { topLeft.x = 3 } rect).topLeft.x
(record { topLeft.x $= (+1) } rect).topLeft.x
(record { topLeft->x = 3 } rect).topLeft.x
(record { topLeft->x $= (+1) } rect).topLeft.x
:q