Skip to content

Instantly share code, notes, and snippets.

@LeifWarner
Created September 13, 2012 21:45
Show Gist options
  • Save LeifWarner/3717923 to your computer and use it in GitHub Desktop.
Save LeifWarner/3717923 to your computer and use it in GitHub Desktop.
def unfold[Z: Zero](z:Z) = z == ∅[Z] !? z.some
@LeifWarner
Copy link
Author

def unfold[Z: Zero](z:Z) = if (z == mzero[Z]) None else Some(z)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment