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
| data Gender = Male | Female deriving (Show, Eq) | |
| data Race = Martian | Venusian deriving (Show, Eq) | |
| answer (Venusian, Male) = id | |
| answer (Martian, Female) = id | |
| answer (Venusian, Female) = not | |
| answer (Martian, Male) = not | |
| race x = (x==).fst | |
| gender x = (x==).snd |
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
| infixl 9 ^-^ -- 笑顔 | |
| infixl 9 >< -- | |
| infixl 9 <.><.> -- 眼 | |
| infixl 9 .^. --逆立ち | |
| d >< b = (b, d) | |
| o <.><.> m = m * o * m | |
| p ^-^ q = show p ++ " ^-^ " ++ show q | |
| r .^. h = ((-r) ^ h, (-h) ^ r) |
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
| 7suwa_0915 | |
| 8565natumi | |
| 8565saki | |
| 8565sio | |
| Manami4392 | |
| RinaIzumi | |
| aiaiaiahaha | |
| akaiayaha | |
| akichyan325 | |
| akiminto |
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 TypeSynonymInstances, DeriveDataTypeable, MultiParamTypeClasses #-} | |
| import XMonad | |
| import XMonad.Config.Kde | |
| import XMonad.Config.Desktop (desktopLayoutModifiers) | |
| import XMonad.Actions.WindowGo | |
| import XMonad.Layout.MultiToggle | |
| import XMonad.Layout.Spiral | |
| import XMonad.Layout.Mosaic | |
| import XMonad.Layout.Reflect | |
| import XMonad.Util.EZConfig |
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
| import Data.Char | |
| splitBy :: (t -> Bool) -> [t] -> [[t]] | |
| splitBy p [] = [] | |
| splitBy p xs = x : (splitBy p $ dropWhile p y) | |
| where (x, y) = break p xs | |
| data State = ON | OFF deriving (Show, Eq) | |
| toggle ON = OFF | |
| toggle OFF = ON |
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
| """ | |
| Maybe monad in Python | |
| use `Just(x)` instead of `return x` | |
| """ | |
| class Maybe(): | |
| def __and__(self, k): # a >>= b | |
| if self.__class__ == __Nothing: | |
| return Nothing |
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 TypeSynonymInstances, DeriveDataTypeable, MultiParamTypeClasses #-} | |
| import XMonad | |
| import XMonad.Config.Kde | |
| import XMonad.Config.Desktop (desktopLayoutModifiers) | |
| import XMonad.Layout.MultiToggle | |
| import XMonad.Util.EZConfig | |
| import qualified XMonad.StackSet as W |
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
| f :: Int -> Bool | |
| f x = even x | |
| f' :: (a -> Int) -> (a -> Bool) | |
| f' = (f.) -- (.) :: (β→γ)→(α→β)→(α→γ) αにa、βにInt、γにBoolが当てはまる。 | |
| f'' :: (b -> (a -> Int)) -> (b -> (a -> Bool)) | |
| f'' = ((f.).) -- (.) :: (β'→γ')→(α'→β')→(α'→γ') α' に b、 β' に a->Int 、 γ'に a->Bool が当てはまる。 | |
| g = length :: [d] -> Int |
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
| 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
| from curtana.parser import * | |
| from curtana.functions import * | |
| def call(f): | |
| return TupleA() ** Return(f) | |
| default_parser = (char("/") >> ( | |
| String("login ") >> call(twitter_auth) * Any | |
| | String("listen ") >> call(listen_timeline) * Any | |
| ) |
OlderNewer