Skip to content

Commit

Permalink
Add flip
Browse files Browse the repository at this point in the history
  • Loading branch information
karbyshev committed Oct 15, 2024
1 parent 5089cad commit 6f9c600
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions util.sml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ fun snd (_, x) = x
fun map_or (x : 'a option) (default : 'b) (f : 'a -> 'b) =
case x of SOME v => f v | NONE => default

fun flip f x y = f y x

fun assert cond str =
if cond then () else raise Fail ("assert " ^ str)

Expand Down

0 comments on commit 6f9c600

Please sign in to comment.