mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-27 18:53:42 +03:00
Fix some typos in the tutorial
This commit is contained in:
parent
211fc359ca
commit
0ea595817a
@ -282,11 +282,13 @@ which reads a number from the console, returning a value of the form
|
||||
|
||||
.. code-block:: idris
|
||||
|
||||
import Data.Strings
|
||||
|
||||
readNumber : IO (Maybe Nat)
|
||||
readNumber = do
|
||||
input <- getLine
|
||||
if all isDigit (unpack input)
|
||||
then pure (Just (cast input))
|
||||
then pure (Just (stringToNatOrZ input))
|
||||
else pure Nothing
|
||||
|
||||
If we then use it to write a function to read two numbers, returning
|
||||
|
@ -753,12 +753,8 @@ For more details of the functions available on ``List`` and
|
||||
|
||||
- ``libs/base/Data/List.idr``
|
||||
|
||||
- ``libs/base/Data/List.idr``
|
||||
|
||||
- ``libs/base/Data/Vect.idr``
|
||||
|
||||
- ``libs/base/Data/VectType.idr``
|
||||
|
||||
Functions include filtering, appending, reversing, and so on.
|
||||
|
||||
Aside: Anonymous functions and operator sections
|
||||
@ -1052,7 +1048,7 @@ name. For example, a pair type could be defined as follows:
|
||||
fst : a
|
||||
snd : b
|
||||
|
||||
Using the ``class`` record from earlier, the size of the class can be
|
||||
Using the ``Class`` record from earlier, the size of the class can be
|
||||
restricted using a ``Vect`` and the size included in the type by parameterising
|
||||
the record with the size. For example:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user