This file contains 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
private final Subject<CurrentJob, CurrentJob> jobSubject = PublishSubject.create(); | |
private final Observable<CurrentJob> jobObservable = jobSubject | |
.flatMap(job -> api call etc...) | |
.doOnNext(job -> job.toReadEvents().forEach(this::processJobReadEvent)); | |
... | |
startDocument() { | |
jobObservable.subscribe(); | |
} | |
endJob() { |
This file contains 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
import Data.Monoid | |
class IsNodes ns where | |
toNodes :: ns -> Nodes | |
fromSeveral :: [ns] -> Nodes | |
instance IsNodes Nodes where | |
toNodes = id | |
fromSeveral = mconcat |
This file contains 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
import Prelude (id, putStr, putStrLn, (>>)) | |
main = | |
elben eats for breakfast the abstractions that choke lesser programmers. | |
whithout a second thought he swims through code that would drown lesser swimmers | |
This file contains 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
augroup filetype_tex | |
autocmd! | |
autocmd Filetype tex let b:inquote = 0 | |
autocmd Filetype tex inoremap <buffer> " <esc>:call <SID>LQuote()<cr>a | |
augroup END | |
function! <SID>LQuote() | |
if b:inquote | |
let q = "''" | |
else |
This file contains 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 Image.Types | |
( Image (Image) | |
, Stroke (Line, Arc, Spot) | |
, Point (Point) | |
, Pen (Circle, Rectangle, ArbitraryPen) | |
, pen | |
, arcCircle | |
, lineRectangle | |
, lineCircle | |
) where |