This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dep | |
sealed trait Bool { | |
type Cata[T <: U, F <: U, U] <: U | |
} | |
sealed trait True extends Bool { | |
type Cata[T <: U, F <: U, U] = T | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RRRWorkItem | |
def self.make device | |
new device.configuration | |
end | |
def do_it | |
result = @configuration.rrr | |
unless result | |
add_error("oops!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> Downloading http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-9.15.tar.bz2 | |
Already downloaded: /Library/Caches/Homebrew/rxvt-unicode-9.15.tar.bz2 | |
/usr/bin/tar xf /Library/Caches/Homebrew/rxvt-unicode-9.15.tar.bz2 | |
==> Patching | |
/usr/bin/patch -f -p1 -i 000-homebrew.diff | |
patching file configure | |
Hunk #1 succeeded at 8048 (offset -207 lines). | |
Hunk #2 succeeded at 8085 (offset -207 lines). | |
patching file src/rxvtfont.C | |
Hunk #1 succeeded at 1265 (offset 3 lines). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> Downloading http://dl.suckless.org/dwm/dwm-6.0.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/dwm-6.0.tar.gz | |
/usr/bin/tar xf /Library/Caches/Homebrew/dwm-6.0.tar.gz | |
==> make PREFIX=/usr/local/Cellar/dwm/6.0 install | |
make PREFIX=/usr/local/Cellar/dwm/6.0 install | |
dwm build options: | |
creating config.h from config.def.h | |
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -DVERSION="6.0" -DXINERAMA | |
CC dwm.c | |
LDFLAGS = -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -L/usr/X11R6/lib -lXinerama |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example | |
object NullThing { | |
implicit def thing2option[A](x:A) = Option(x) | |
def main(args: Array[String]) { | |
val a: Option[Int] = null | |
val b: Option[Int] = Some(5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeClass | |
def initialize a, b, c | |
@a, @b, @c = a, b, c | |
end | |
private | |
def some_method x, y | |
@c.work_with x | |
@c.do_something y | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeClass | |
def initialize a, b, c | |
@a, @b, @c = a, b, c | |
end | |
def some_method | |
@b.work_with @a.something | |
@c.do_something @a.something_else | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeClass | |
def initialize a, b, c | |
@a, @b, @c = a, b, c | |
end | |
def some_method | |
do_something_with @a, | |
some_work_with @b | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sux where | |
import Data.List | |
sux :: Ord a => [a] -> Maybe [a] | |
sux ns = sux' ns [] | |
sux' :: Ord a => [a] -> [a] -> Maybe [a] | |
sux' pfx sfx | |
| canInc sfx = Just $ pfx ++ (inc sfx) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sux where | |
import Data.List | |
sux :: Eq a => [a] -> [[a]] | |
sux (a:b:[]) = [[a,b], [b,a]] | |
sux ns = do | |
x <- ns | |
let xs = delete x ns | |
xs' <- sux xs |