Last active
March 19, 2019 02:55
-
-
Save andyarvanitis/ecd467efd99667e40521bdcc570f5022 to your computer and use it in GitHub Desktop.
purescript-native Arduino target blinky (experimental)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Prelude | |
| import Effect (Effect) | |
| fib :: Int -> Int | |
| fib 0 = 0 | |
| fib 1 = 1 | |
| fib n = fib (n - 2) + fib (n - 1) | |
| -- Blink the built-in LED n times | |
| foreign import blink :: Int -> Effect Unit | |
| main :: Effect Unit | |
| main = do | |
| blink (fib 6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment