Skip to content

Instantly share code, notes, and snippets.

@aziis98
Created December 26, 2018 00:11
Show Gist options
  • Select an option

  • Save aziis98/2678bf7aa05b51c05a6467dd78feb32d to your computer and use it in GitHub Desktop.

Select an option

Save aziis98/2678bf7aa05b51c05a6467dd78feb32d to your computer and use it in GitHub Desktop.
(A number := 12)
(A bit of text := "Here there is some text")
(println (join (A bit of text) " and the number " (A number)))
(Sum of things := ((A number) + 5))
(i, j := (tuple of 12 and 16))
(My List := (range from 1 to 5))
(lambda (x) (x * 2)
; => implicit function of x -> x * 2
(map (My List) by (lambda (x) (x * 2)))
; => [2 4 6 8 10]
(map (My List) by (* 2))
; => [2 4 6 8 10]
; Examples for 1.
(pattern (range from (a : Int) to (b : Int))
(the range := (empty list))
(for (i) from a to b by (+ 1) do
(append (i) to (the range))
)
)

WordyLisp

A function can be defined with the following matching criteria

  1. Word constraint
  2. Type constraint
  3. Value constraint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment