Search notes:

Haskell

-- Comments are introduces with two hyphens (much like in SQL)
"abc" is syntactic sugar for 'a': 'b': 'c': []
a:b:c:d is shorthand for a:b:(c:d)

Pattern matching

Values are pattern matched («deconstructed») by writing however they were constructed.
let (x, y, z) = (42, 99, 7) in …
let (char1:char_2:char3:[]) = "abc" in …
-- Use underscore for 'throw away' values:
let (first_char:_:_:[]) = "abc" in first_char

See also

Other programming languages etc.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759282076, '216.73.216.88', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Haskell/index(53): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78