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
(* | |
* 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. |
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
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 |
ニンジャー
事前準備
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
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) | |
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
using System; | |
using System.ComponentModel; | |
namespace LangExt.Playground | |
{ | |
public sealed class LazyVal<T> | |
{ | |
readonly Func<T> f; | |
bool hasValue = false; | |
T value; |
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
using System; | |
namespace LangExt.Playground | |
{ | |
public sealed class LazyVal<T> | |
{ | |
T value; | |
bool hasValue = false; | |
readonly Func<T> 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
interface A { | |
hoge(str:string): string; | |
} | |
interface B { | |
hoge(str:string): string; | |
} | |
class AImpl implements A { | |
hoge(str) { |
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
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 |
NewerOlder