Skip to content

Instantly share code, notes, and snippets.

View bleis-tift's full-sized avatar

bleis-tift bleis-tift

View GitHub Profile
@bleis-tift
bleis-tift / sample.adoc
Last active April 22, 2016 01:49 — forked from xmeta/sample.adoc

タイトル

第一章

350x150
図1.1: hogehoge
@bleis-tift
bleis-tift / assertSeqEquals.fs
Created April 8, 2016 02:35 — forked from Gab-km/assertSeqEquals.fs
Persimmon の暫定的な assertSeqEquals を書いてみた
(*
* The MIT License (MIT)
*
* Copyright (c) 2016 Kazuhiro Matsushima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the
* Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
type NonEmptyList<'T> = 'T * 'T list
type AssertResult<'T> =
| Failure of NonEmptyList<string>
| Success of 'T
type TestBuilder(description: string) =
// これを解除するとコンパイルエラーになってしまう・・・
// member __.Bind(x, f) =
// match x with

Scala おすすめポイントご紹介


おすすめポイント

普段Scalaを使っていて、この機能は便利、よくできていると感じているところをご紹介します。


準備

@bleis-tift
bleis-tift / ninja.md
Last active December 19, 2015 06:49 — forked from mzp/ninja.md

Functional Ninja #3 (OCaml編 その2)

Functional Ninjaとは

ニンジャー

事前準備

@bleis-tift
bleis-tift / AgentRuntime.scala
Last active December 18, 2015 01:39 — forked from karno/AgentRuntime.scala
仕事の片手間に単純に書き換えただけなのでアレだけど。Scalaってシャドウイングできたっけ・・・レベル
class AgentRuntime(profile: Properties, holder: ServiceBindingHolder[MicroRuntimeServiceBinder]) {
def startAgent(name: String, args: Array[AnyRef]): Future[AgentController] =
for {
binder <- holder.getServiceBinder()
binder <- createContainer(binder)
binder <- startAgentCore(name, args, binder)
} yield MicroRuntime.getAgent(name)
@bleis-tift
bleis-tift / 0.LazyVal.cs
Last active December 17, 2015 07:28 — forked from anonymous/gist:5572563
System.Lazyの合成できる版的な
using System;
using System.ComponentModel;
namespace LangExt.Playground
{
public sealed class LazyVal<T>
{
readonly Func<T> f;
bool hasValue = false;
T value;
using System;
namespace LangExt.Playground
{
public sealed class LazyVal<T>
{
T value;
bool hasValue = false;
readonly Func<T> f;
interface A {
hoge(str:string): string;
}
interface B {
hoge(str:string): string;
}
class AImpl implements A {
hoge(str) {
@bleis-tift
bleis-tift / TaskMonad.cs
Created November 20, 2012 07:18 — forked from yoshihiro503/TaskMonad.cs
C# で非同期タスク モナド書いてみた。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Proofcafe
{
public static class TaskMonad