You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _chapters/haskell1.md
+7-9
Original file line number
Diff line number
Diff line change
@@ -212,7 +212,7 @@ But there are definitely cons:
212
212
213
213
The Haskell way of defining Lambda (anonymous) functions is heavily inspired by [Lambda Calculus](/lambdacalculus/), but also looks a bit reminiscent of the JavaScript arrow syntax:
214
214
215
-
```haskell
215
+
```none
216
216
JavaScript
217
217
x=>x
218
218
@@ -244,12 +244,12 @@ main = putStrLn $ y ("circular reasoning works because " ++)
244
244
245
245
Consider the following pseudocode for a simple recursive definition of the Quick Sort algorithm:
246
246
247
-
```lambdacalc
247
+
```none
248
248
QuickSort list:
249
249
Take head of list as a pivot
250
250
Take tail of list as rest
251
251
return
252
-
QuickSort( elements of rest < pivot ) ++ (pivot : QuickSort( elements of rest >= pivot ))
252
+
QuickSort( elements of rest < pivot ) ++ (pivot : QuickSort( elements of rest >= pivot ))
253
253
```
254
254
255
255
We’ve added a bit of notation here: `a : l` inserts a (“cons”es) to the front of a list `l` ; `l1 ++ l2` is the concatenation of lists `l1` and `l2`.
0 commit comments