p4p is an actively used programming language created in 2010. an alternate syntax for Racket.

10Years Old 26Users ?Jobs

Example code from the web:

defvar: m = 10
defvar: this-better-be-6 = add(1, 2, 3)
defvar: this-better-be-0 = add()
deffun: five() = 5
deffun: trpl(x) = add(x, x, x)
deffun: g(a, b, c) = add(a, b, c)
deffun: d/dx(f) =

  defvar: delta = 0.001

  fun: (x) in:

    div(sub(f(add(x, delta)),

            f(x)),

        delta)
 deffun: fib(n) =
   if: numeq(n, 0)
     1
   elseif: numeq(n, 1)
     1
   else:
     add(fib(sub1(n)), fib(sub(n, 2)))

Last updated February 18th, 2020

Edit p4p on GitHub