Skip to content

Instantly share code, notes, and snippets.

@fowlmouth
Created February 18, 2014 02:28
Show Gist options
  • Save fowlmouth/c7af1fe926629fd932f6 to your computer and use it in GitHub Desktop.
Save fowlmouth/c7af1fe926629fd932f6 to your computer and use it in GitHub Desktop.
import fowltek/maybe_t
proc `<` * (a, b: int): TMaybe[int] =
result.has = system.`<`(a,b)
result.val = b
proc `<` * (a: TMaybe[int]; b: int): TMaybe[int]=
if not a.has:
return Nothing[int]()
result.has = system.`<`(a.val, b)
result.val = b
var y = 5
var x: bool = 0 < y < 7
echo x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment