1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 15:18:01 +00:00

Add some clarity by distinguishing var names

This commit is contained in:
jbranchaud
2018-07-03 16:53:21 -05:00
parent 71ed17387c
commit 80ac8d3cea

View File

@@ -10,11 +10,11 @@ The `Stream.from` function lets you define a function for custom fitting
data structures into streams. Let's take a look:
```reason
let pokemon = [| "bulbasaur", "charmander", "squirtle" |];
let pokemons = [| "bulbasaur", "charmander", "squirtle" |];
let poke_stream: Stream.t(string) =
Stream.from(i =>
switch (pokemon[i]) {
switch (pokemons[i]) {
| pokemon => Some(pokemon)
| exception (Invalid_argument("index out of bounds")) => None
}