#. SUPER-SIMPLE CHATBOT

#. Output then input
loop \ x\\(
  oN ++ "< " #x;
  rl ()
);

#. Get name and greet
name \ loop "What is your name?";
reply \ loop join "" [
  "Hello, "
  rstr [`\n`g ""] #name
  ". I'll copy you from now on."
];

#. Keep copying input
while [1 loop] reply

Easy

Everything is simple, from installation to programming to package management. This is by design! Wonder is for those who want a no-frills coding process.



Functional

Wonder is a functional programming language; most notably, it implements de Bruijn indices directly in the syntax. Add in other sugary features such as currying, prefix notation, and dynamic typing and you've got yourself one helluva language. Not to mention, the syntax is super-flexible, too — readability freak or code-golf maniac, Wonder can adapt to your style.

#. The following snippets are several ways 
#. of outputting the ASCII characters.
#. (one snippet per line)

fc rng 0 127                  #. average joe
join "" map #fc tk 127 gen I  #. total overkill
(fc (rng 0 127))              #. lisp junkie

#. Fibonacci sequence with memoization
f\ 0\\0;
f\ 1\\1;
f\\\ x\\(
  f\#x\\#y;
  #y
) y\ (+ f - #x 1) f - #x 2;
oN map #f rng 1 50


#. Lambda bodies do not evaluate unless applied.
@+1 1; #. does not become @2 yet

#. Conditionals evaluate one expression
#. or the other, but not both.
(
  rl()
    ? "there is input"
    ? "no input"
)

#. Infinite list operations!
(map *2) rng 0 oo;

Lazy

Wonder only evaluates when absolutely necessary; this allows us to have infinite lists and other nice goodies. But Wonder is also built for lazy programmers. Shorter function names, less need for parentheses/punctuation, and the ability to leave out trailing quotes and brackets? Wonder has it all.



What are you waiting for?

Github - Docs - NPM - Todo's