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 Control.Applicative | |
data A | |
data B | |
data C | |
data D | |
data X | |
f :: A -> B -> C |
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 Main where | |
import Data.Maybe | |
import Data.Monoid | |
import Control.Applicative | |
import Control.Monad.State | |
import Control.Lens | |
import Text.Trifecta | |
main :: IO () | |
main = do |
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 Main where | |
import Game.NovelMonad | |
import Game.NovelMonad.SimpleInterpreter | |
import Story | |
main :: IO () | |
main = simpleInterpret defaultConfig novelMain | |
novelMain :: Novel () | |
novelMain = do |
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 Main where | |
import Control.Monad | |
import Data.List | |
step :: Int | |
step = 5 | |
clusterCount :: Int -> Int | |
clusterCount n = n * (n + 1) `div` 2 | |
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 Main where | |
import Control.Monad | |
import Control.Monad.Trans | |
-- Try | |
data Try a b = Success a | Failed b deriving Show | |
instance Monad (Try a) where | |
return x = Failed x | |
m >>= k = case m of | |
Success x -> Success x |
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
public class Main { | |
private static void procces(boolean success, String procName){ | |
if(success){ | |
System.out.println("処理 " + procName + " 成功"); | |
throw new RuntimeException(); | |
} | |
System.out.println("処理 " + procName + " 失敗。。。"); | |
} | |
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
/ ) | |
./ / | |
/ / | |
/ / | |
./ / , -つ | |
/ /・_・`) /__ノ | |
/ \ / / | |
.| へ/ / | |
| レ' /、二つ | |
| / |
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 | |
/ ュヘ | * + 。 + 。 + | |
〈_} ) | | |
/ ! + 。 + + * |
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
(´・_・`) | |
/, / | |
(ぃ9 | | |
/ /、 | |
/ ∧_二つ | |
/ / | |
/ \ | |
/ /~\ \ | |
/ / > ) | |
/ ノ / / |
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 RankNTypes #-} | |
{-# LANGUAGE ExistentialQuantification #-} | |
module Main where | |
---------- | |
-- Eff | |
newtype Eff r a = Eff { runEff :: forall w. (a -> VE w r) -> VE w r} | |
instance Monad (Eff r) where | |
--return :: a -> Eff a |