Skip to content

Instantly share code, notes, and snippets.

@rcythr
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcythr/fa6b2abcfb173db1b5b3 to your computer and use it in GitHub Desktop.
Save rcythr/fa6b2abcfb173db1b5b3 to your computer and use it in GitHub Desktop.
A simple concept of a language to implement.
import "other_functions.texc"
fun foo(a, b, \theta in reals, N in integers) -> reals =
\sum_{i=0}^{N} ( \sin(\theta) + a^i + b^i )
fun foorec(a, b, \theta in reals, N in integers) -> reals =
if N < 0 then
return 0
else
\sin(\theta) + a^N + b^N + foorec(a, b, \theta, N-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment