Skip to content

Instantly share code, notes, and snippets.

@tsloughter
Created July 16, 2011 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsloughter/1085873 to your computer and use it in GitHub Desktop.
Save tsloughter/1085873 to your computer and use it in GitHub Desktop.
greater_than_3(X) when X > 3 -> true;
greater_than_3(X) -> false.
@md2perpe
Copy link

Doesn't it work with just

greater_than_3(X) -> X > 3.

@tsloughter
Copy link
Author

Yeah, definitely. I was just showing someone simple guard expressions to show how they are used. This example wasn't the best to show when you'd use them :)

@md2perpe
Copy link

It can be difficult to come up with a good example when you just want a simple example.

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