Skip to content

nycdavid/haj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language features

  • Ruby-like syntax + static typing
def print(): void
	puts("Haj 0.1")
	puts(">>> ")
end

def add(a: Integer, b: Integer): Integer
	a + b
end
  • First-class functions
def map(array: Array<Any>, mapFn: Function): Array<Any>
	...
end

arry = [0, 1, 2]

def double(term: Integer): Integer
	term * 2
end

map(arry, double)
- Notice here that `double` is referenced _without_ parentheses. This is
	how we reference a function in Haj (without invoking it)
  • Anonymous functions TBD

About

Let's try writing a language....

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published