{{ message }}

Instantly share code, notes, and snippets.

# Michihito Shigemurashigemk2

Created Sep 3, 2015
View 03-170432.py
 # coding:utf-8 def λ(a): return a def ほげ(a): return a print λ(5) print ほげ(5)
Created Sep 3, 2015
View 03-165657.php

Created Sep 2, 2015
View 03-004240.scala
 def ほげ(n: Int): Int = { n } println(ほげ(3)) type ほげ = Int def α(n: ほげ): ほげ = { n
Created Sep 2, 2015
View pierre.hs
 type Birds = Int type Pole = (Birds, Birds) -- 鳥 landLeft :: Birds -> Pole -> Pole landLeft n (left, right) = (left + n, right) landRight :: Birds -> Pole -> Pole landRight n (left, right) = (left, right + n) -- バランス棒
Created Sep 2, 2015
View applyMaybe.hs
 -- オレオレバインド(>>=)の実装 applyMaybe :: Maybe a -> (a -> Maybe b) -> Maybe b applyMaybe Nothing f = Nothing applyMaybe (Just x) f = f x main = do print \$ Just 3 `applyMaybe` \ x -> Just (x+1) print \$ Just "smile" `applyMaybe` \ x -> Just (x ++ " :)") print \$ Nothing `applyMaybe` \ x -> Just (x+1) print \$ Nothing `applyMaybe` \ x -> Just (x ++ " :)")
Created Aug 28, 2015
View 28-164209.scala
 class A { class B def f(b: B) = println("Got my B!") } val a1 = new A println(a1) val a2 = new A println(a2)
Created Aug 28, 2015
View 28-164209.scala
 class A { class B def f(b: B) = println("Got my B!") } val a1 = new A println(a1) val a2 = new A println(a2)
Created Aug 26, 2015
View mikutter-misakura.rb
 # -*- coding: utf-8 -*- def AheGaoDoublePeace(text) str = text str = str.gsub(/(気持|きも)ちいい/,'ぎも゛ぢい゛い゛ぃ') str = str.gsub(/(大好|だいす)き/,'らいしゅきいぃっ') str = str.gsub(/(ミルク|みるく|牛乳)/,'ちんぽミルク') str = str.gsub(/お(願|ねが)い/,'お願いぃぃぃっっっﾞ') str = str.gsub(/ぁ/,'ぁぁ゛ぁ゛') str = str.gsub(/あ/,'ぁあああ あぉ')
Created Aug 24, 2015
View 24-202513.js
 function a() { return "hoge"; } function b() { "use strict"; eeee; eeee } (5 <= 6) ? console.log(a()) : console.log(b()); // (5 >= 6) ? console.log(a()) : console.log(b()); // エラー
Created Aug 24, 2015
View 24-202513.js
 function a() { return "hoge"; } function b() { eeee; eeee } (5 <= 6) ? console.log(a()) : console.log(b()); // (5 >= 6) ? console.log(a()) : console.log(b()); // エラー
You can’t perform that action at this time.