FISh ![]() |
http://www-staff.it.uts.edu.au/~cbj/FISh/index.html |
Description: | FISh is a functional language with imperativ features. The FISh compiler is written in OCaml and the generated code is high-performant C sourcecode. If you believe in the benchmark results (I do!), quicksort written in FISh is more than twice as fast as the qsort routine of the C standard library (because C uses pointers whereas FISh does not). |
Hello World | Michael Neumann |
(* Hello World in FISh *) output "Hello World" ;; |
Prints "Hello World" onto the
screen. |
Squares (1) | Michael Neumann |
for 1 <= i < 11 do output (i*i) done;; |
Outputs the squares from 1 to
10. |
Squares (2) | Michael Neumann |
(* function sqr *) let sqr x = x * x ;; (* array with 10 integers *) let a = fill { 10 : int_shape } with [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ;; (* apply function sqr onto every element of array a *) let res = map sqr a;; output res;; |
Outputs the squares from 1 to
10. |