Skip to content

Commit 3b20d93

Browse files
i3gameshdgarrood
i3games
authored andcommitted
Update Getting Started tutorial (documentationjs#90)
Fix documentationjs#86: remove `let` from repl commands. Fix documentationjs#87 and documentationjs#88: note that the user should expect to see some warnings for missing type signatures.
1 parent 104f71e commit 3b20d93

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

guides/Getting-Started.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ You should see a list with 1000 elements printed to the command line.
122122

123123
This value can be given a name, using a `let` binding:
124124

125-
> let ns = range 0 999
125+
> ns = range 0 999
126126

127127
Now let's filter out all of those elements which do not meet the criterion. We can use the `filter` function from `Data.List`, by providing a predicate function as its first argument:
128128

129-
> let multiples = filter (\n -> mod n 3 == 0 || mod n 5 == 0) ns
129+
> multiples = filter (\n -> mod n 3 == 0 || mod n 5 == 0) ns
130130

131131
You can see the result by evaluating `multiples` if you like, or even check its type:
132132

@@ -182,6 +182,8 @@ Alternatively, we can use Pulp to compile our new module to JavaScript:
182182

183183
This will compile each module present in `src/` into a separate file in the `output/` directory.
184184

185+
The compiler will display several warnings about missing type declarations. In general it is considered good practice to provide explicit type signatures. In this guide, they are left out for brevity. In the absence of type signatures, the PureScript compiler infers types automatically but will remind us to consider adding them.
186+
185187
#### Writing a Test Suite
186188

187189
To test our code, we'll use the `purescript-assert` library:

0 commit comments

Comments
 (0)