Skip to content

Instantly share code, notes, and snippets.

@ploubser
Created July 9, 2012 15:14
Show Gist options
  • Save ploubser/3077098 to your computer and use it in GitHub Desktop.
Save ploubser/3077098 to your computer and use it in GitHub Desktop.
Illume language prototype
/* Check if foo is present in an array */
/* General language functions */
#import “stdlib”
func main: argv {
list = [‘foo’, ‘bar’, baz’];
return find_value(list, ‘baz’);
}
func find_value: list, value{
(size(list) == 0) ->
return false;
(list[0] == value)
->
return true;
:
return find_value(subset(list, 1, size(list), value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment