Functional Reactive Programming for the Arduino

View the tutorial » Install the compiler»

FARM Participants

Please visit the install page to get the compiler. Make sure to install PlatformIO as well. The source code for the demo project can be found here:

Here are the PDF versions of the FARM presentations:

Lightweight and Effective

Not only does functional programming allow for strong scalability of compact, readable and effective code, but functional reactive programming is specifically designed to handle timing based events in an intuitive way. Juniper is designed to carry these advantages, as well as be lightweight enough to function viably on Arduino.


Juniper supports many features typical of functional programming languages, including algebraic data types, tuples, records, pattern matching, immutable data structures, parametric polymorphic functions, and anonymous functions (lambdas).

Some imperative programming concepts are also present in Juniper, such as for, while and do while loops, the ability to mark variables as mutable, and mutable references.

Completely Open Source

The Juniper compiler, standard library and documentation are all open sourced under the MIT License. The Juniper compiler itself is written in F#, an open source language originally developed by Microsoft Research.