Mixfix operators
This commit is contained in:
@@ -59,9 +59,9 @@ runFile fn =
|
||||
let text = readFile fn in
|
||||
log fn >>
|
||||
log "part1" >>
|
||||
log (part1 text (digits1 . unpack)) >>
|
||||
log (part1 text (digits1 ∘ unpack)) >>
|
||||
log "part2" >>
|
||||
log (part1 text (digits2 . unpack)) >>
|
||||
log (part1 text (digits2 ∘ unpack)) >>
|
||||
log ""
|
||||
|
||||
|
||||
|
||||
@@ -157,6 +157,6 @@ map f Nil = Nil
|
||||
map f (x :: xs) = f x :: map f xs
|
||||
|
||||
|
||||
infixl 9 _._
|
||||
_._ : {A B C : U} -> (B -> C) -> (A -> B) -> A -> C
|
||||
infixl 9 _∘_
|
||||
_∘_ : {A B C : U} -> (B -> C) -> (A -> B) -> A -> C
|
||||
(f . g) x = f ( g x)
|
||||
|
||||
Reference in New Issue
Block a user