view samples/fib.tp @ 268:123e9468d55e

Add support for invoking methods that take no arguments other than self through the relfection API
author Michael Pavone <pavone@retrodev.com>
date Fri, 18 Jul 2014 09:55:19 -0700
parents 3a169ebb3224
children
line wrap: on
line source

#{
fib <- :n {
  if: n < 2 {
    1
  } else: {
    (fib: n-1) + (fib: n-2)
  }
}

main <- {
  print: (string: (fib: 30)) . "\n"
}

}