- CARTA HOLDINGS(旧VOYAGE GROUP)
- 技術広報が新卒研修<Open AIハッカソン>をスパイしてみた - (2023/04/11)
- @t_wadaに学ぶテスト駆動開発【CARTA 23新卒研修】 - (2023/04/19)
- 【新卒研修】監修者@t_wadaと読む!プログラマが知るべき97のこと読書会 - (2024/04/09)
- Classi
- 当たり前にリリースしていく ~ 新卒研修編 - (2021/05/20)
- リモートワークのための質問力向上研修を実施しました - (2021/12/07)
- CyberZ
- 良いコードとは何か - エンジニア新卒研修 スライド公開 - (2021/04/27)
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
#!/bin/bash | |
usage_exit() { | |
die <<EOF | |
Usage: $0 <query> | |
Search text in source code from GitHub. | |
Options: | |
-h show this help | |
-f output format {yaml,json,line} (default: yaml) |
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
open System | |
open Microsoft.FSharp.Core | |
// maybe there is a better way to simplify this | |
let private (|Greater|_|) descendent compareResult = | |
match compareResult with | |
| n when n < 0 && descendent -> None | |
| n when n < 0 && not descendent -> Some() | |
| 0 -> None | |
| n when n > 0 && descendent -> Some() |
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
// General hints on defining types with constraints or invariants | |
// | |
// Just as in C#, use a private constructor | |
// and expose "factory" methods that enforce the constraints | |
// | |
// In F#, only classes can have private constructors with public members. | |
// | |
// If you want to use the record and DU types, the whole type becomes | |
// private, which means that you also need to provide: | |
// * a constructor function ("create"). |
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 FPStyle = | |
[<AbstractClass>] | |
type Eq<'A, 'B> private () = | |
abstract F : 'A -> 'B | |
abstract G : 'B -> 'A | |
static member Id<'A>() = | |
{ new Eq<'A, 'A>() with | |
member this.F(x) = x | |
member this.G(x) = 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
module ToyTypeInfer | |
type Var = string | |
type Expr = | |
| ENum of int | |
| EBool of bool | |
| EVar of Var | |
| EPlus of Expr * Expr | |
| EIf of Expr * Expr * Expr |