All Projects → protoship → Learn Reasonml Workshop

protoship / Learn Reasonml Workshop

Licence: apache-2.0
Learn ReasonML with 24 exercises. No prior functional programming knowledge required.

Programming Languages

ocaml
1615 projects
reason
219 projects

Labels

Projects that are alternatives of or similar to Learn Reasonml Workshop

relude-random
Composable random generators based on the PCG paper
Stars: ✭ 15 (-94.34%)
Mutual labels:  reasonml
bs-react-is-visible
A small library that lets you know whether a component is visible on screen or not.
Stars: ✭ 15 (-94.34%)
Mutual labels:  reasonml
bs-react-native-vector-icons
ReasonML bindings for react-native-vector-icons
Stars: ✭ 16 (-93.96%)
Mutual labels:  reasonml
reason-nodejs
Node bindings for Reason and Bucklescript
Stars: ✭ 105 (-60.38%)
Mutual labels:  reasonml
rescript-urql
ReScript bindings for Formidable's Universal React Query Library, urql.
Stars: ✭ 230 (-13.21%)
Mutual labels:  reasonml
credt
CRDT-like data structures for building distributed, offline-first applications
Stars: ✭ 32 (-87.92%)
Mutual labels:  reasonml
shmup.re
Learning Reason/OCaml by making an old-school canvas game.
Stars: ✭ 24 (-90.94%)
Mutual labels:  reasonml
expo-reason-starter
This project allows you to quickly get started with building mobile apps in ReasonML/ReScript
Stars: ✭ 16 (-93.96%)
Mutual labels:  reasonml
rescript-game-of-life
Game of Life in ReasonML with ReasonReact in 2020
Stars: ✭ 36 (-86.42%)
Mutual labels:  reasonml
reasonreact-starter
Minimal yet powerful ReasonReact template
Stars: ✭ 33 (-87.55%)
Mutual labels:  reasonml
awesome-ppx-reasonml
curated list of reasonml PPX rewriter
Stars: ✭ 28 (-89.43%)
Mutual labels:  reasonml
naboris
Simple, fast, minimalist http server for OCaml/ReasonML
Stars: ✭ 71 (-73.21%)
Mutual labels:  reasonml
rescript-react-compat
An alternative upgrade path for ReasonReact
Stars: ✭ 17 (-93.58%)
Mutual labels:  reasonml
react-multiversal
React components that works everywhere (iOS, Android, Web, Node)
Stars: ✭ 43 (-83.77%)
Mutual labels:  reasonml
resuggest
Discover ReasonML functions that do what you want. https://GuillaumeSalles.github.io/resuggest
Stars: ✭ 85 (-67.92%)
Mutual labels:  reasonml
onetricks.net
(WIP) kayn-powered (typescript node.js) ReasonReact app presenting you a dashboard of high ELO one trick ponies in League of Legends
Stars: ✭ 13 (-95.09%)
Mutual labels:  reasonml
REInfer
Runtime Extended Inference for json data.
Stars: ✭ 23 (-91.32%)
Mutual labels:  reasonml
Bs Jest
BuckleScript bindings for Jest
Stars: ✭ 255 (-3.77%)
Mutual labels:  reasonml
respect
RSpec inspired test framework for Reason/OCaml/Bucklescript.
Stars: ✭ 28 (-89.43%)
Mutual labels:  reasonml
bs-promise-monad
Monadic syntax to work with promise in ReasonML
Stars: ✭ 38 (-85.66%)
Mutual labels:  reasonml

Introduction

Reason is a language that looks and reads like Javascript, writes like Javascript, and even interops nicely with Javascript. But it is in fact a new syntax for OCaml, a powerful statically typed functional programming language.

The syntax makes ReasonML easy to start playing with, but unless you already know a typed functional language, you will soon run into stumbling blocks because of unfamiliarity with static types and functional programming.

Fear not! Work through these exercises and learn all the basics - defining and using functions, understanding recursion, lists, list operations, variants, and all the way till mutable variables. They will give you a great foundation to start mastering this beautiful language.

Credits

These exercises are originally from a workshop organized by Jane Street for teaching OCaml to programmers who work in other languages and who do not necessarily have experience with functional languages. Link to the original repo. We adapted the tutorials and exercise code to the Reason syntax and toolchain.

Setting Up

  1. Setup your editor. We recommend VSCode along with the vscode-reasonml extension. If you prefer a different editor check the instructions for other supported editors

  2. Clone this repository, and run npm install.

Workflow

The exercises are numerically ordered and can be found in the src/exercises directory.

Start by opening the first exercise in a text editor - src/exercises/01-introduction/introduction.re. It will tell you where to go from there.

All exercises except the first one comes with a test. Run them as you complete each exercise. For example for the second exercise, run its test with:

node src/exercises/02-basic_types/basicTypes.bs.js

This .bs.js file is your Reason program (.re) compiled to Javascript. .bs stands for the bucklescript compiler. The .bs.js code is readable Javascript - give them a look if you're curious!

You can also run ./run_tests which will run all the tests automatically for you and stop at the first failing one.

Support

Please feel free to raise an issue if you have any questions as you work through the exercises. You can also find help in the Reason Discord channel, or in the Reason Discourse forum.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].