Skip to content

Instantly share code, notes, and snippets.

View vito's full-sized avatar

Alex Suraci vito

View GitHub Profile
todo.hs $ ghc todo.hs -o todo
todo.o: In function `rJc_info':
(.text+0x189): undefined reference to `bytestringzm0zi9zi1zi4_DataziByteString_zdf3_closure'
todo.o: In function `sJG_info':
(.text+0x1c5): undefined reference to `bytestringzm0zi9zi1zi4_DataziByteStringziChar8_lines_closure'
todo.o: In function `sJN_info':
(.text+0x2b2): undefined reference to `bytestringzm0zi9zi1zi4_DataziByteStringziChar8_unlines_closure'
todo.o: In function `sJP_info':
(.text+0x314): undefined reference to `bytestringzm0zi9zi1zi4_DataziByteString_writeFile_closure'
todo.o: In function `sJB_info':
@vito
vito / Tests
Created November 23, 2008 02:37
Haskell $ ./sudoku test # Takes roughly 50 seconds.
tst1:
| 5 | | 1 | | | | |
4 | | | 6 | | 2 | | |
| 6 | | | | 8 | 1 | 7 |
7 | 4 | | 8 | | | | |
| | | | | | | |
| | | | | 3 | | 5 | 9
| 1 | 3 | 7 | | | | 2 |
| | | 4 | | 6 | | | 8
True ? x = const x
False ? _ = id
main = print $ False ? "Hi!" $ "Boo!"
$HTTP["host"] =~ "yoursite\.com" {
server.error-handler-404 = "/path/to/chyrp/index.php"
}
["Hi!!"]
f :: String -> [String]
f x = [x ++ "!", x ++ "."]
["Hi"] >>= f >>= f
-- is:
(["Hi"] >>= f) >>= f
-- Which, according to the Prelude implementation of the List monad...:
instance Monad [] where
<?php
class Quote extends Feathers implements Feather {
public function __construct() {
$this->setField(array("attr" => "quote",
"type" => "text_block",
"rows" => 5,
"label" => __("Quote", "quote"),
"bookmarklet" => "selection"));
$this->setField(array("attr" => "source",
"type" => "text_block",