Prelude> 1 + (2 + 3)
6
Prelude> (1 + 2) + 3
6
Prelude> [1] ++ ([2] ++ [3])
[1,2,3]
Prelude> ([1] ++ [2]) ++ [3]
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
enum 真理値 {真, 偽} | |
enum 騎士か奇人 {騎士, 奇人} | |
abstract sig 命題 {真偽: one 真理値} | |
abstract sig 人間 { | |
発言: lone 命題, | |
種族: 騎士か奇人 | |
} { | |
some 発言 => (種族 = 騎士 <=> 発言.真偽 = 真) | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Microphone Input Test</title> | |
</head> | |
<body> | |
<div>LevelMeter</div> | |
<div> |
#概念 #設定 ##Editor コレ設定しないとcommitメッセージ入力するときエラーみたいなのが出る
git config --global core.editor /usr/bin/vim
##設定ファイルを直に見る
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 java.util.concurrent.{ConcurrentHashMap, Callable, Executors, ExecutorService} | |
import scala.collection.{mutable, concurrent} | |
import scala.collection.JavaConverters._ | |
object Main extends App { | |
val ex = Executors.newFixedThreadPool(2) | |
val len = 50 | |
val m: concurrent.Map[Integer, Integer] = new ConcurrentHashMap[Integer, Integer]().asScala | |
m.clear() |
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 akka.actor._ | |
import akka.pattern.ask | |
import akka.util.Timeout | |
import java.util.concurrent.TimeUnit | |
import scala.util.{Failure, Success, Random} | |
import scala.util.control.Breaks.{break, breakable} | |
import scala.concurrent.duration.Duration | |
import scala.concurrent.Await | |
object Main extends App { |
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
headOption :: [x] -> Maybe x | |
headOption [] = Nothing | |
headOption (x:xs) = Just x | |
tailOption :: [x] -> Maybe [x] | |
tailOption [] = Nothing | |
tailOption (x:xs) = Just xs |
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
fizzBuzzList :: [Int] -> [String] | |
fizzBuzzList = map fizzBuzz | |
fizzBuzz :: Int -> String | |
fizzBuzz v | |
| v `mod` 5 == 0 && v `mod` 3 == 0 = "FizzBuzz" | |
| v `mod` 3 == 0 = "Fizz" | |
| v `mod` 5 == 0 = "Buzz" | |
| otherwise = show v | |