Skip to content

Commit 51956ec

Browse files
committed
Fix tutorial 3 formatting
1 parent a1a9d99 commit 51956ec

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tutorials/03_branching.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,8 +621,10 @@ Only the arguments that are actually used are evaluated. This is a direct conseq
621621

622622
Some operations cannot proceed without actual values. For example, arithmetic requires its arguments to be evaluated:
623623

624+
```
624625
ghci> 3 + undefined
625626
*** Exception: Prelude.undefined
627+
```
626628

627629
This does not contradict laziness — it simply means the *value is now required*. Laziness delays evaluation, but it does not eliminate it.
628630

@@ -676,8 +678,9 @@ Crucially, list comprehensions are *lazy*: even if they describe infinite lists,
676678

677679
A list comprehension has the form:
678680

681+
```
679682
[ expression | generators, conditions, local bindings ]
680-
683+
```
681684

682685
This mirrors mathematical notation:
683686

@@ -1048,7 +1051,7 @@ A practical rule of thumb:
10481051

10491052
* `String` = teaching, small programs, quick scripts
10501053
* `Text` = most real-world Unicode text processing
1051-
* `ByteString` = binary data, I/O, networking
1054+
* `ByteString` = binary data, I/O, networking
10521055

10531056
You can always convert between them when needed and sometimes your choice will depend on library support.
10541057

0 commit comments

Comments
 (0)