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
| ;; Emacs の PIDとバッファー名を表示するようにする | |
| ;; https://www.emacswiki.org/emacs/FrameTitle | |
| (setq-default frame-title-format (list (format "%x @ " (emacs-pid)) "%b")) |
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 App | |
| def plus1(n) | |
| n + 1 | |
| end | |
| def double(n) | |
| n * 2 | |
| end | |
| def triple(n) |
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
| INFINITY_STACK = false | |
| class List | |
| private | |
| def initialize() | |
| @null = false | |
| end | |
| class NullList < List |
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
| {-# LANGUAGE OverloadedStrings #-} | |
| module Main where | |
| import Network.Wai | |
| import Network.HTTP.Types | |
| import Network.Wai.Handler.Warp (run) | |
| import qualified Data.ByteString.Lazy as LBS(fromStrict) | |
| import qualified Data.ByteString as SBS(ByteString) |
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
| {-# LANGUAGE OverloadedStrings #-} | |
| module Main where | |
| import Blaze.ByteString.Builder (toLazyByteString, Builder) | |
| import Blaze.ByteString.Builder.ByteString (fromByteString) | |
| import Data.String (IsString) | |
| import Control.Monad.IO.Class (liftIO) | |
| import Control.Monad.Writer (execWriterT, execWriter, WriterT, Writer, MonadWriter, tell) |
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
| docker run -d -p 9200:9200 -p 9300:9300 --name jdoi-elasticsearch elasticsearch -Des.network.host=::0 |
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 Nothing | |
| constructor: () -> | |
| bind: (f) -> | |
| @ | |
| class Just | |
| constructor: (b) -> | |
| @just = b | |
| bind: (f) -> |
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 Aaa | |
| def hello | |
| 'a' | |
| end | |
| end | |
| class Bbb | |
| def hello | |
| '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
| def λ (&block) | |
| (lambda &block).curry | |
| end | |
| plus = λ {|x, y| x + y } | |
| plus1 = plus[1] | |
| three = plus1[2] | |
| puts three |
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
| {-# LANGUAGE RecordWildCards #-} | |
| module Handler.Hoge where | |
| import Import | |
| -- ... | |
| data Person = Person | |
| { name :: Text |