ML style functional programming language that runs on the JVM.
The goal of the Yeti is to have a clean and minimal expressive language on the JVM that allows functional style programming, has static type inference and interfaces well with Java code.
Some of the features:
- Type inference using the Hindley-Milner algorithm. The types are statically inferred at compile time without a need for explicit type declarations.
- Polymorphic structure and variant types. Using those resembles duck typing from the dynamic languages - for example, when a value is used as a structure having a field foo, which gives string value, then any structure with string field foo will be good enough.
- Property fields in structures (access goes through function calls).
- Lazy lists
- Pattern matching on values
- Comfortable string regex support
- Easy to call existing Java code
- Interactive REPL environment for experimenting
- Compiles directly to Java bytecode
given = randomInt 1000 + 1; println "Thought a number in range 1...1000, guess it?"; (guess n = (print "> "; v = number (readln ()); if v == given then println "Correct! \(n) tries."; else println if v < given then "Too small." else "Too big." fi; guess (n + 1); fi)) 1;
Information updated 08/28/15