SlideShare a Scribd company logo
1 of 98
Download to read offline
F#

   bleis-tift


August 28, 2011
F#
      F#
NParsec    FParsec
F#
F#




OCaml

.NET Framework
F#
F#
cons
1 3
[1; 2; 3]
[1..3]
1::2::3::[]
1::2::[3]
[ 1
  2
  3 ]
cons
cons
cons
cons
cons
cons
let xs = [2..10]
let ys = 1::xs
int   string   int * string
1
let x, y = 10, 20
printfn "%A" (x, y) // => (10, 20)

             2
let (x,   y) as tpl = 1,   2
printfn   "%A" tpl         // => (1, 2)
printfn   "%A" (x, y)      // => (1, 2)
printfn   "(%d, %d)" x y   // => (1, 2)
let [x;   y] as lst = [1; 2]
printfn   "%A" lst       // => [1; 2]
printfn   "%A" [x; y]    // => [1; 2]
printfn   "[%d; %d]" x y // => [1; 2]


warning FS0025:
            ’[_;_;_]’
1
1
1
2



(2, "hoge") // int * string


//
[2; "hoge"]

[box 1; box "hoge"] // obj list
2
//     ,
let p = "       ", 21


type Person = {
  Name: string
  Age: int
}
let p = { Name = "       "; Age = 21 }

                     4
F#


type Person(name: string, age: int) =
  member this.Name = name
  member this.Age = age
let p = Person("        ", 21)


type Person = { Name: string; Age: int }
let p = { Name = "       "; Age = 21 }
type Person(name: string, age: int) =
  member x.Name = name
  member x.Age = age
let f p = p.Name


error FS0072:
type Person = { Name: string; Age: int }
let f p = p.Name


type Person =
  {Name: string;
   Age: int;}
val f : Person -> string
(   )
(enum)
HtmlElem
C#


public abstract class HtmlElem {}
public class Heading : HtmlElem {
  public int Level { get; private set; }
  public string Text { get; private set; }
  public Heading(int level, string txt) {
    Level = level; Text = txt; } }
public class Text : HtmlElem {
  public string Text { get; private set; }
  public Text(string txt) {
    Text = txt; } }
public class HorizontalLine : HtmlElem {}
F#




type HtmlElem =
| Text of string
| Heading of int * string
| HorizontalLine
Equals

GetHashCode
Make static analyzers happy
==           !=




ToString
sprintf ”%A”
F#




F#
     C#
HtmlElem HTML
type HtmlElem =
| Heading of int * string
| Text of string
| HorizontalLine

let toHtmlStr elem =
  let h lv s =
    sprintf "<h%d>%s</h%d>" lv s lv
  match elem with
  | Heading(level, txt) -> h level txt
  | Text txt -> "<p>" + txt + "</p>"
  | HorizontalLine -> "<hr/>"
                    match
let add =   function
| 0, y ->   y
| x, 0 ->   x
| x, y ->   x + y
                       function
match     function


match
let add tpl =
  match tpl with
  | x, y -> x + y

function
let add = function
| x, y -> x + y
type t = { Tag: int; Value: int }
let value { Value = v } = v
match

match
let add tpl =
  match tpl with
  | x, y -> x + y

function
let add = function
| x, y -> x + y


let add (x, y) = x + y
Person
type Name = {
  FirstName: string
  LastName: string
}
type Person = { Name: Name; Age: int }

let f x =
  let { Name = { FirstName = fn } } = x
  fn
F#
Maybe
type MaybeBuilder() =
  member this.Bind(x, f) =
    x |> Option.bind f
  member this.Return(x) = Some x
let maybe = MaybeBuilder()

let plus   db = maybe {
  let! x   = db |> Map.tryFind "x"
  let! y   = db |> Map.tryFind "y"
  return   x + y
}
Map-Reduce   ( )




fold    reduce
fold
fold   reduce




fold   reduce
F#

fold reduce
> List.fold;;
val it : ((’a -> ’b -> ’a) -> ’a -> ’b list -> ’a)
 = <fun:clo@1>
> List.reduce;;
val it : ((’a -> ’a -> ’a) -> ’a list -> ’a)
 = <fun:clo@2-1>


fold

reduce                   list
                  list
fold
fold
fold
fold
fold



fold
sum
forall
map
filter
fold



fold
sum
forall
map
filter
fold    sum




sum
let sum xs =
  List.fold (+) 0 xs
fold     forall



forall
let forall p xs =
   xs
   |> List.fold (fun acc x -> acc && (p x)) true



exists
fold   map


map
let map f xs =
  ([], xs)
  ||> List.fold (fun acc x ->
        acc @ [f x]
      )
fold   filter


filter
let filter p xs =
  ([], xs)
  ||> List.fold begin acc x ->
        if p x then acc @ [x]
        else acc
      end
fold


fold

       fold(   unfold)
                         fold
F#
F#
F#
     .NET
F#



        F#
.NET Framework
.NET Framework



                       2.0
             .NET Framework


                  F#
.NET Framework


   F# .NET Framework2.0
   Runtime
   .NET Framework2.0   LINQ
       F #   List



.NET Framework           2.0   F#
.NET Framework

                  4.0                 F#
       TDDBC Tokyo 1.6

              C#        (         )
           KeyValueTime.cs       42
           SystemClock.cs        30
           TddbcKeyValueStore.cs 67

             F#       (          )
             KeyValueStore.fs 48

C#   139             F#   48
.NET Framework

                   4.0                 F#
        TDDBC Tokyo 1.6

           C#        (            )
     KeyValueTimeTest.cs       141
     SystemClockTest.cs        34
     TddbcKeyValueStoreTest.cs 346      ( )

           F#        (             )
            KeyValueStore.fs 170

C#   521           F#     170
.NET Framework




.NET Framework        F#

           2.0   C#
      F#
F#

.NET        F#

   option
F#   C#
VB
.NET



C#   VB
F#   list    F#     dll



            array   seq
static

NewHoge
                        Tag
                          IsHoge



          F#
module Hoge
let plus10 = ((+)10)
       Hoge.plus10
        FSharp.Core.FSharpFunc
                       FSharp.Core.dll
NParsec   FParsec
yacc       lex
       yacc lex
BNF
parsec
JParsec
NParsec
FParsec
scala.util.parsing
Boost.Spirit
NParsec



parsec    .NET
C#
                           C#

          Java
Scanner
FParsec




parsec   .NET
F#
NParsec   FParsec
NParsec


var lazyexpr = new Parser<double>[1];
var plazyexpr = Parsers.Lazy<double>(() =>
  lazyexpr[0]
);
var pterm =
  plazyexpr.Between(popen, pclose) | pnum;
var pexpr = ...
lazyexpr[0] = pexpr;
FParsec


let pexpr, exprref =
  createParserForwardedToRef()
let pterm =
      pexpr |> between popen pclose
  <|> pnum
do exprref := ...
F#   10   C#    54

     C#
           Visitor
C#
F#
NParsec         Bind
return Parsers.Return(...)
FParsec
NParsec
F#



     FParsec

               F#

More Related Content

What's hot

C# 8.0 null許容参照型
C# 8.0 null許容参照型C# 8.0 null許容参照型
C# 8.0 null許容参照型信之 岩永
 
DeNAオリジナル ゲーム専用プラットフォーム Sakashoについて
DeNAオリジナル ゲーム専用プラットフォーム SakashoについてDeNAオリジナル ゲーム専用プラットフォーム Sakashoについて
DeNAオリジナル ゲーム専用プラットフォーム SakashoについてMakoto Haruyama
 
C# ゲームプログラミングはホントにメモリのことに無頓着でいいの?
C# ゲームプログラミングはホントにメモリのことに無頓着でいいの?C# ゲームプログラミングはホントにメモリのことに無頓着でいいの?
C# ゲームプログラミングはホントにメモリのことに無頓着でいいの?京大 マイコンクラブ
 
CEDEC2021 ダウンロード時間を大幅減!~大量のアセットをさばく高速な実装と運用事例の共有~
CEDEC2021 ダウンロード時間を大幅減!~大量のアセットをさばく高速な実装と運用事例の共有~ CEDEC2021 ダウンロード時間を大幅減!~大量のアセットをさばく高速な実装と運用事例の共有~
CEDEC2021 ダウンロード時間を大幅減!~大量のアセットをさばく高速な実装と運用事例の共有~ SEGADevTech
 
【Unity道場】AssetGraph入門 〜ノードを駆使しててUnityの面倒な手作業を自動化する方法〜
【Unity道場】AssetGraph入門 〜ノードを駆使しててUnityの面倒な手作業を自動化する方法〜【Unity道場】AssetGraph入門 〜ノードを駆使しててUnityの面倒な手作業を自動化する方法〜
【Unity道場】AssetGraph入門 〜ノードを駆使しててUnityの面倒な手作業を自動化する方法〜Unity Technologies Japan K.K.
 
【Unity】 Behavior TreeでAIを作る
 【Unity】 Behavior TreeでAIを作る 【Unity】 Behavior TreeでAIを作る
【Unity】 Behavior TreeでAIを作るtorisoup
 
UniRxでMV(R)Pパターン をやってみた
UniRxでMV(R)PパターンをやってみたUniRxでMV(R)Pパターンをやってみた
UniRxでMV(R)Pパターン をやってみたtorisoup
 
【Unite Tokyo 2018】なんとっ!ユナイト!ミリシタをささえる『AKANE大作戦』とは?
【Unite Tokyo 2018】なんとっ!ユナイト!ミリシタをささえる『AKANE大作戦』とは?【Unite Tokyo 2018】なんとっ!ユナイト!ミリシタをささえる『AKANE大作戦』とは?
【Unite Tokyo 2018】なんとっ!ユナイト!ミリシタをささえる『AKANE大作戦』とは?UnityTechnologiesJapan002
 
30分で分かる!OSの作り方
30分で分かる!OSの作り方30分で分かる!OSの作り方
30分で分かる!OSの作り方uchan_nos
 
Web開発者が始める .NET MAUI Blazor App
Web開発者が始める .NET MAUI Blazor AppWeb開発者が始める .NET MAUI Blazor App
Web開発者が始める .NET MAUI Blazor AppTomomitsuKusaba
 
何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門masayoshi takahashi
 
Unityネイティブプラグインの勧め 〜UnityでiOS, AndroidのAPIを利用する方法〜
Unityネイティブプラグインの勧め 〜UnityでiOS, AndroidのAPIを利用する方法〜Unityネイティブプラグインの勧め 〜UnityでiOS, AndroidのAPIを利用する方法〜
Unityネイティブプラグインの勧め 〜UnityでiOS, AndroidのAPIを利用する方法〜KLab Inc. / Tech
 
Micrometer/Prometheusによる大規模システムモニタリング #jsug #sf_26
Micrometer/Prometheusによる大規模システムモニタリング #jsug #sf_26Micrometer/Prometheusによる大規模システムモニタリング #jsug #sf_26
Micrometer/Prometheusによる大規模システムモニタリング #jsug #sf_26Yahoo!デベロッパーネットワーク
 
5分で出来る!イケてるconfluenceページ
5分で出来る!イケてるconfluenceページ5分で出来る!イケてるconfluenceページ
5分で出来る!イケてるconfluenceページCLARA ONLINE, Inc.
 
リアルタイムサーバー 〜Erlang/OTPで作るPubSubサーバー〜
リアルタイムサーバー 〜Erlang/OTPで作るPubSubサーバー〜 リアルタイムサーバー 〜Erlang/OTPで作るPubSubサーバー〜
リアルタイムサーバー 〜Erlang/OTPで作るPubSubサーバー〜 Yugo Shimizu
 
新入社員のための大規模ゲーム開発入門 サーバサイド編
新入社員のための大規模ゲーム開発入門 サーバサイド編新入社員のための大規模ゲーム開発入門 サーバサイド編
新入社員のための大規模ゲーム開発入門 サーバサイド編infinite_loop
 
Unity開発で使える設計の話+Zenjectの紹介
Unity開発で使える設計の話+Zenjectの紹介Unity開発で使える設計の話+Zenjectの紹介
Unity開発で使える設計の話+Zenjectの紹介torisoup
 
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践Yoshifumi Kawai
 
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]スマホゲームのチート手法とその対策 [DeNA TechCon 2019]
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]DeNA
 
若輩エンジニアから見たUniRxを利用したゲーム開発
若輩エンジニアから見たUniRxを利用したゲーム開発若輩エンジニアから見たUniRxを利用したゲーム開発
若輩エンジニアから見たUniRxを利用したゲーム開発Hirohito Morinaga
 

What's hot (20)

C# 8.0 null許容参照型
C# 8.0 null許容参照型C# 8.0 null許容参照型
C# 8.0 null許容参照型
 
DeNAオリジナル ゲーム専用プラットフォーム Sakashoについて
DeNAオリジナル ゲーム専用プラットフォーム SakashoについてDeNAオリジナル ゲーム専用プラットフォーム Sakashoについて
DeNAオリジナル ゲーム専用プラットフォーム Sakashoについて
 
C# ゲームプログラミングはホントにメモリのことに無頓着でいいの?
C# ゲームプログラミングはホントにメモリのことに無頓着でいいの?C# ゲームプログラミングはホントにメモリのことに無頓着でいいの?
C# ゲームプログラミングはホントにメモリのことに無頓着でいいの?
 
CEDEC2021 ダウンロード時間を大幅減!~大量のアセットをさばく高速な実装と運用事例の共有~
CEDEC2021 ダウンロード時間を大幅減!~大量のアセットをさばく高速な実装と運用事例の共有~ CEDEC2021 ダウンロード時間を大幅減!~大量のアセットをさばく高速な実装と運用事例の共有~
CEDEC2021 ダウンロード時間を大幅減!~大量のアセットをさばく高速な実装と運用事例の共有~
 
【Unity道場】AssetGraph入門 〜ノードを駆使しててUnityの面倒な手作業を自動化する方法〜
【Unity道場】AssetGraph入門 〜ノードを駆使しててUnityの面倒な手作業を自動化する方法〜【Unity道場】AssetGraph入門 〜ノードを駆使しててUnityの面倒な手作業を自動化する方法〜
【Unity道場】AssetGraph入門 〜ノードを駆使しててUnityの面倒な手作業を自動化する方法〜
 
【Unity】 Behavior TreeでAIを作る
 【Unity】 Behavior TreeでAIを作る 【Unity】 Behavior TreeでAIを作る
【Unity】 Behavior TreeでAIを作る
 
UniRxでMV(R)Pパターン をやってみた
UniRxでMV(R)PパターンをやってみたUniRxでMV(R)Pパターンをやってみた
UniRxでMV(R)Pパターン をやってみた
 
【Unite Tokyo 2018】なんとっ!ユナイト!ミリシタをささえる『AKANE大作戦』とは?
【Unite Tokyo 2018】なんとっ!ユナイト!ミリシタをささえる『AKANE大作戦』とは?【Unite Tokyo 2018】なんとっ!ユナイト!ミリシタをささえる『AKANE大作戦』とは?
【Unite Tokyo 2018】なんとっ!ユナイト!ミリシタをささえる『AKANE大作戦』とは?
 
30分で分かる!OSの作り方
30分で分かる!OSの作り方30分で分かる!OSの作り方
30分で分かる!OSの作り方
 
Web開発者が始める .NET MAUI Blazor App
Web開発者が始める .NET MAUI Blazor AppWeb開発者が始める .NET MAUI Blazor App
Web開発者が始める .NET MAUI Blazor App
 
何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門
 
Unityネイティブプラグインの勧め 〜UnityでiOS, AndroidのAPIを利用する方法〜
Unityネイティブプラグインの勧め 〜UnityでiOS, AndroidのAPIを利用する方法〜Unityネイティブプラグインの勧め 〜UnityでiOS, AndroidのAPIを利用する方法〜
Unityネイティブプラグインの勧め 〜UnityでiOS, AndroidのAPIを利用する方法〜
 
Micrometer/Prometheusによる大規模システムモニタリング #jsug #sf_26
Micrometer/Prometheusによる大規模システムモニタリング #jsug #sf_26Micrometer/Prometheusによる大規模システムモニタリング #jsug #sf_26
Micrometer/Prometheusによる大規模システムモニタリング #jsug #sf_26
 
5分で出来る!イケてるconfluenceページ
5分で出来る!イケてるconfluenceページ5分で出来る!イケてるconfluenceページ
5分で出来る!イケてるconfluenceページ
 
リアルタイムサーバー 〜Erlang/OTPで作るPubSubサーバー〜
リアルタイムサーバー 〜Erlang/OTPで作るPubSubサーバー〜 リアルタイムサーバー 〜Erlang/OTPで作るPubSubサーバー〜
リアルタイムサーバー 〜Erlang/OTPで作るPubSubサーバー〜
 
新入社員のための大規模ゲーム開発入門 サーバサイド編
新入社員のための大規模ゲーム開発入門 サーバサイド編新入社員のための大規模ゲーム開発入門 サーバサイド編
新入社員のための大規模ゲーム開発入門 サーバサイド編
 
Unity開発で使える設計の話+Zenjectの紹介
Unity開発で使える設計の話+Zenjectの紹介Unity開発で使える設計の話+Zenjectの紹介
Unity開発で使える設計の話+Zenjectの紹介
 
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
 
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]スマホゲームのチート手法とその対策 [DeNA TechCon 2019]
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]
 
若輩エンジニアから見たUniRxを利用したゲーム開発
若輩エンジニアから見たUniRxを利用したゲーム開発若輩エンジニアから見たUniRxを利用したゲーム開発
若輩エンジニアから見たUniRxを利用したゲーム開発
 

Viewers also liked

解説?FSharp.Quotations.Compiler
解説?FSharp.Quotations.Compiler解説?FSharp.Quotations.Compiler
解説?FSharp.Quotations.Compilerbleis tift
 
モナドハンズオン前座
モナドハンズオン前座モナドハンズオン前座
モナドハンズオン前座bleis tift
 
F#の基礎(?)
F#の基礎(?)F#の基礎(?)
F#の基礎(?)bleis tift
 
Better C#の脱却を目指して
Better C#の脱却を目指してBetter C#の脱却を目指して
Better C#の脱却を目指してbleis tift
 
Capítol 1 música amagada
Capítol 1 música amagadaCapítol 1 música amagada
Capítol 1 música amagadaJoanprofe
 
「民進党ゆるキャラ総選挙」人気を予測しました
「民進党ゆるキャラ総選挙」人気を予測しました「民進党ゆるキャラ総選挙」人気を予測しました
「民進党ゆるキャラ総選挙」人気を予測しましたToshihisa Tanaka
 
Microservices. The good, the bad and the ugly.
Microservices. The good, the bad and the ugly.Microservices. The good, the bad and the ugly.
Microservices. The good, the bad and the ugly.Sander Hoogendoorn
 
Update version of the SMBE/SESBE Lecture on ENCODE & junk DNA (Graur, Decembe...
Update version of the SMBE/SESBE Lecture on ENCODE & junk DNA (Graur, Decembe...Update version of the SMBE/SESBE Lecture on ENCODE & junk DNA (Graur, Decembe...
Update version of the SMBE/SESBE Lecture on ENCODE & junk DNA (Graur, Decembe...Dan Graur
 
Introduction to customer success by Guy Nirpaz @ Totango
Introduction to customer success  by Guy Nirpaz @ TotangoIntroduction to customer success  by Guy Nirpaz @ Totango
Introduction to customer success by Guy Nirpaz @ TotangoCEO Quest
 
インクルーシブ教育システムの構築に向けたスクールワイドな支援モデルの可能性
インクルーシブ教育システムの構築に向けたスクールワイドな支援モデルの可能性インクルーシブ教育システムの構築に向けたスクールワイドな支援モデルの可能性
インクルーシブ教育システムの構築に向けたスクールワイドな支援モデルの可能性Akina Noguchi
 
Fc - 5 fortes motivos meninas aprenderem a programar já
Fc - 5 fortes motivos meninas aprenderem a programar jáFc - 5 fortes motivos meninas aprenderem a programar já
Fc - 5 fortes motivos meninas aprenderem a programar jáJayme Nigri
 
ปรัชญากับวิถีชีวิต
ปรัชญากับวิถีชีวิตปรัชญากับวิถีชีวิต
ปรัชญากับวิถีชีวิตPadvee Academy
 
How *NOT* to firmware
How *NOT* to firmwareHow *NOT* to firmware
How *NOT* to firmwareAmit Serper
 
1ST YEAR Infographics about team sport
 1ST YEAR Infographics about team sport 1ST YEAR Infographics about team sport
1ST YEAR Infographics about team sportCiclos Formativos
 
Making Story Apps - The Art of Little Red Riding Hood
Making Story Apps - The Art of Little Red Riding HoodMaking Story Apps - The Art of Little Red Riding Hood
Making Story Apps - The Art of Little Red Riding Hoodedatnosycrow
 
Tell your own story : how can you build human values for innovation? (preview)
Tell your own story : how can you build human values for innovation? (preview)Tell your own story : how can you build human values for innovation? (preview)
Tell your own story : how can you build human values for innovation? (preview)WeAreInnovation
 

Viewers also liked (20)

解説?FSharp.Quotations.Compiler
解説?FSharp.Quotations.Compiler解説?FSharp.Quotations.Compiler
解説?FSharp.Quotations.Compiler
 
モナドハンズオン前座
モナドハンズオン前座モナドハンズオン前座
モナドハンズオン前座
 
F#の基礎(?)
F#の基礎(?)F#の基礎(?)
F#の基礎(?)
 
Better C#の脱却を目指して
Better C#の脱却を目指してBetter C#の脱却を目指して
Better C#の脱却を目指して
 
Capítol 1 música amagada
Capítol 1 música amagadaCapítol 1 música amagada
Capítol 1 música amagada
 
「民進党ゆるキャラ総選挙」人気を予測しました
「民進党ゆるキャラ総選挙」人気を予測しました「民進党ゆるキャラ総選挙」人気を予測しました
「民進党ゆるキャラ総選挙」人気を予測しました
 
Microservices. The good, the bad and the ugly.
Microservices. The good, the bad and the ugly.Microservices. The good, the bad and the ugly.
Microservices. The good, the bad and the ugly.
 
Sadigh Gallery Spring Savings Events 2017
Sadigh Gallery Spring Savings Events 2017Sadigh Gallery Spring Savings Events 2017
Sadigh Gallery Spring Savings Events 2017
 
Update version of the SMBE/SESBE Lecture on ENCODE & junk DNA (Graur, Decembe...
Update version of the SMBE/SESBE Lecture on ENCODE & junk DNA (Graur, Decembe...Update version of the SMBE/SESBE Lecture on ENCODE & junk DNA (Graur, Decembe...
Update version of the SMBE/SESBE Lecture on ENCODE & junk DNA (Graur, Decembe...
 
Presentacion estrella rural
Presentacion estrella ruralPresentacion estrella rural
Presentacion estrella rural
 
Introduction to customer success by Guy Nirpaz @ Totango
Introduction to customer success  by Guy Nirpaz @ TotangoIntroduction to customer success  by Guy Nirpaz @ Totango
Introduction to customer success by Guy Nirpaz @ Totango
 
インクルーシブ教育システムの構築に向けたスクールワイドな支援モデルの可能性
インクルーシブ教育システムの構築に向けたスクールワイドな支援モデルの可能性インクルーシブ教育システムの構築に向けたスクールワイドな支援モデルの可能性
インクルーシブ教育システムの構築に向けたスクールワイドな支援モデルの可能性
 
White paper on french companies in india
White paper on french companies in indiaWhite paper on french companies in india
White paper on french companies in india
 
Fc - 5 fortes motivos meninas aprenderem a programar já
Fc - 5 fortes motivos meninas aprenderem a programar jáFc - 5 fortes motivos meninas aprenderem a programar já
Fc - 5 fortes motivos meninas aprenderem a programar já
 
Pieredze daudzdzīvokļu dzīvojamo māju siltināšanā
Pieredze daudzdzīvokļu dzīvojamo māju siltināšanāPieredze daudzdzīvokļu dzīvojamo māju siltināšanā
Pieredze daudzdzīvokļu dzīvojamo māju siltināšanā
 
ปรัชญากับวิถีชีวิต
ปรัชญากับวิถีชีวิตปรัชญากับวิถีชีวิต
ปรัชญากับวิถีชีวิต
 
How *NOT* to firmware
How *NOT* to firmwareHow *NOT* to firmware
How *NOT* to firmware
 
1ST YEAR Infographics about team sport
 1ST YEAR Infographics about team sport 1ST YEAR Infographics about team sport
1ST YEAR Infographics about team sport
 
Making Story Apps - The Art of Little Red Riding Hood
Making Story Apps - The Art of Little Red Riding HoodMaking Story Apps - The Art of Little Red Riding Hood
Making Story Apps - The Art of Little Red Riding Hood
 
Tell your own story : how can you build human values for innovation? (preview)
Tell your own story : how can you build human values for innovation? (preview)Tell your own story : how can you build human values for innovation? (preview)
Tell your own story : how can you build human values for innovation? (preview)
 

Similar to 仕事で使うF#

GE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python ProgrammingGE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python ProgrammingMuthu Vinayagam
 
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docxlab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docxDIPESH30
 
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docxlab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docxDIPESH30
 
Functional Programming in F#
Functional Programming in F#Functional Programming in F#
Functional Programming in F#Dmitri Nesteruk
 
Functions In Scala
Functions In Scala Functions In Scala
Functions In Scala Knoldus Inc.
 
Lex (lexical analyzer)
Lex (lexical analyzer)Lex (lexical analyzer)
Lex (lexical analyzer)Sami Said
 
Scala - where objects and functions meet
Scala - where objects and functions meetScala - where objects and functions meet
Scala - where objects and functions meetMario Fusco
 
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate CompilersFunctional Thursday
 
The Kotlin Programming Language
The Kotlin Programming LanguageThe Kotlin Programming Language
The Kotlin Programming Languageintelliyole
 
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPythonByterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPythonakaptur
 
C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)Saifur Rahman
 
Mouse programming in c
Mouse programming in cMouse programming in c
Mouse programming in cgkgaur1987
 
Implementing Software Machines in Go and C
Implementing Software Machines in Go and CImplementing Software Machines in Go and C
Implementing Software Machines in Go and CEleanor McHugh
 
JBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersJBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersTikal Knowledge
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.pptssuserd64918
 
An overview of Python 2.7
An overview of Python 2.7An overview of Python 2.7
An overview of Python 2.7decoupled
 

Similar to 仕事で使うF# (20)

GE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python ProgrammingGE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python Programming
 
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docxlab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
 
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docxlab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
 
Scala 2 + 2 > 4
Scala 2 + 2 > 4Scala 2 + 2 > 4
Scala 2 + 2 > 4
 
Functional Programming in F#
Functional Programming in F#Functional Programming in F#
Functional Programming in F#
 
Functions In Scala
Functions In Scala Functions In Scala
Functions In Scala
 
Lex (lexical analyzer)
Lex (lexical analyzer)Lex (lexical analyzer)
Lex (lexical analyzer)
 
String Manipulation Function and Header File Functions
String Manipulation Function and Header File FunctionsString Manipulation Function and Header File Functions
String Manipulation Function and Header File Functions
 
Scala - where objects and functions meet
Scala - where objects and functions meetScala - where objects and functions meet
Scala - where objects and functions meet
 
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
 
The Kotlin Programming Language
The Kotlin Programming LanguageThe Kotlin Programming Language
The Kotlin Programming Language
 
F# intro
F# introF# intro
F# intro
 
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPythonByterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
 
C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)
 
Mouse programming in c
Mouse programming in cMouse programming in c
Mouse programming in c
 
C# programming
C# programming C# programming
C# programming
 
Implementing Software Machines in Go and C
Implementing Software Machines in Go and CImplementing Software Machines in Go and C
Implementing Software Machines in Go and C
 
JBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersJBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java Programmers
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.ppt
 
An overview of Python 2.7
An overview of Python 2.7An overview of Python 2.7
An overview of Python 2.7
 

More from bleis tift

PCさえあればいい。
PCさえあればいい。PCさえあればいい。
PCさえあればいい。bleis tift
 
No more Legacy documents
No more Legacy documentsNo more Legacy documents
No more Legacy documentsbleis tift
 
効果の低いテストの話
効果の低いテストの話効果の低いテストの話
効果の低いテストの話bleis tift
 
テストの自動化を考える前に
テストの自動化を考える前にテストの自動化を考える前に
テストの自動化を考える前にbleis tift
 
札束でExcelを殴る
札束でExcelを殴る札束でExcelを殴る
札束でExcelを殴るbleis tift
 
.NET系開発者から見たJava
.NET系開発者から見たJava.NET系開発者から見たJava
.NET系開発者から見たJavableis tift
 
SI屋のためのF# ~DSL編~
SI屋のためのF# ~DSL編~SI屋のためのF# ~DSL編~
SI屋のためのF# ~DSL編~bleis tift
 
F#事例発表
F#事例発表F#事例発表
F#事例発表bleis tift
 
yield and return (poor English ver)
yield and return (poor English ver)yield and return (poor English ver)
yield and return (poor English ver)bleis tift
 
yieldとreturnの話
yieldとreturnの話yieldとreturnの話
yieldとreturnの話bleis tift
 
F#の基礎(嘘)
F#の基礎(嘘)F#の基礎(嘘)
F#の基礎(嘘)bleis tift
 
現実(えくせる)と戦う話
現実(えくせる)と戦う話現実(えくせる)と戦う話
現実(えくせる)と戦う話bleis tift
 
ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)
ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)
ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)bleis tift
 
async/await不要論
async/await不要論async/await不要論
async/await不要論bleis tift
 
F#によるFunctional Programming入門
F#によるFunctional Programming入門F#によるFunctional Programming入門
F#によるFunctional Programming入門bleis tift
 
VBAを書きたくない話(Excel-DNAの紹介)
VBAを書きたくない話(Excel-DNAの紹介)VBAを書きたくない話(Excel-DNAの紹介)
VBAを書きたくない話(Excel-DNAの紹介)bleis tift
 
JSX / Haxe / TypeScript
JSX / Haxe / TypeScriptJSX / Haxe / TypeScript
JSX / Haxe / TypeScriptbleis tift
 
F#で始めるスマートフォンアプリ
F#で始めるスマートフォンアプリF#で始めるスマートフォンアプリ
F#で始めるスマートフォンアプリbleis tift
 
ぼくのかんがえたさいきょうのLL
ぼくのかんがえたさいきょうのLLぼくのかんがえたさいきょうのLL
ぼくのかんがえたさいきょうのLLbleis tift
 

More from bleis tift (20)

PCさえあればいい。
PCさえあればいい。PCさえあればいい。
PCさえあればいい。
 
No more Legacy documents
No more Legacy documentsNo more Legacy documents
No more Legacy documents
 
効果の低いテストの話
効果の低いテストの話効果の低いテストの話
効果の低いテストの話
 
テストの自動化を考える前に
テストの自動化を考える前にテストの自動化を考える前に
テストの自動化を考える前に
 
札束でExcelを殴る
札束でExcelを殴る札束でExcelを殴る
札束でExcelを殴る
 
.NET系開発者から見たJava
.NET系開発者から見たJava.NET系開発者から見たJava
.NET系開発者から見たJava
 
SI屋のためのF# ~DSL編~
SI屋のためのF# ~DSL編~SI屋のためのF# ~DSL編~
SI屋のためのF# ~DSL編~
 
F#事例発表
F#事例発表F#事例発表
F#事例発表
 
yield and return (poor English ver)
yield and return (poor English ver)yield and return (poor English ver)
yield and return (poor English ver)
 
yieldとreturnの話
yieldとreturnの話yieldとreturnの話
yieldとreturnの話
 
F#の基礎(嘘)
F#の基礎(嘘)F#の基礎(嘘)
F#の基礎(嘘)
 
現実(えくせる)と戦う話
現実(えくせる)と戦う話現実(えくせる)と戦う話
現実(えくせる)と戦う話
 
ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)
ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)
ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)
 
async/await不要論
async/await不要論async/await不要論
async/await不要論
 
F#によるFunctional Programming入門
F#によるFunctional Programming入門F#によるFunctional Programming入門
F#によるFunctional Programming入門
 
VBAを書きたくない話(Excel-DNAの紹介)
VBAを書きたくない話(Excel-DNAの紹介)VBAを書きたくない話(Excel-DNAの紹介)
VBAを書きたくない話(Excel-DNAの紹介)
 
JSX / Haxe / TypeScript
JSX / Haxe / TypeScriptJSX / Haxe / TypeScript
JSX / Haxe / TypeScript
 
自分戦略
自分戦略自分戦略
自分戦略
 
F#で始めるスマートフォンアプリ
F#で始めるスマートフォンアプリF#で始めるスマートフォンアプリ
F#で始めるスマートフォンアプリ
 
ぼくのかんがえたさいきょうのLL
ぼくのかんがえたさいきょうのLLぼくのかんがえたさいきょうのLL
ぼくのかんがえたさいきょうのLL
 

Recently uploaded

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 

Recently uploaded (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

仕事で使うF#

  • 1. F# bleis-tift August 28, 2011
  • 2.
  • 3. F# F# NParsec FParsec
  • 4. F#
  • 6. F#
  • 8. 1 3 [1; 2; 3] [1..3] 1::2::3::[] 1::2::[3] [ 1 2 3 ]
  • 10. cons
  • 11. cons
  • 12. cons
  • 13. cons
  • 14. cons
  • 15. let xs = [2..10] let ys = 1::xs
  • 16. int string int * string
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. 1 let x, y = 10, 20 printfn "%A" (x, y) // => (10, 20) 2 let (x, y) as tpl = 1, 2 printfn "%A" tpl // => (1, 2) printfn "%A" (x, y) // => (1, 2) printfn "(%d, %d)" x y // => (1, 2)
  • 23. let [x; y] as lst = [1; 2] printfn "%A" lst // => [1; 2] printfn "%A" [x; y] // => [1; 2] printfn "[%d; %d]" x y // => [1; 2] warning FS0025: ’[_;_;_]’
  • 24. 1
  • 25. 1
  • 26. 1
  • 27. 2 (2, "hoge") // int * string // [2; "hoge"] [box 1; box "hoge"] // obj list
  • 28. 2
  • 29.
  • 30.
  • 31. // , let p = " ", 21 type Person = { Name: string Age: int } let p = { Name = " "; Age = 21 } 4
  • 32. F# type Person(name: string, age: int) = member this.Name = name member this.Age = age let p = Person(" ", 21) type Person = { Name: string; Age: int } let p = { Name = " "; Age = 21 }
  • 33. type Person(name: string, age: int) = member x.Name = name member x.Age = age let f p = p.Name error FS0072:
  • 34. type Person = { Name: string; Age: int } let f p = p.Name type Person = {Name: string; Age: int;} val f : Person -> string
  • 35. ( )
  • 38. C# public abstract class HtmlElem {} public class Heading : HtmlElem { public int Level { get; private set; } public string Text { get; private set; } public Heading(int level, string txt) { Level = level; Text = txt; } } public class Text : HtmlElem { public string Text { get; private set; } public Text(string txt) { Text = txt; } } public class HorizontalLine : HtmlElem {}
  • 39. F# type HtmlElem = | Text of string | Heading of int * string | HorizontalLine
  • 42. F# F# C#
  • 43.
  • 44. HtmlElem HTML type HtmlElem = | Heading of int * string | Text of string | HorizontalLine let toHtmlStr elem = let h lv s = sprintf "<h%d>%s</h%d>" lv s lv match elem with | Heading(level, txt) -> h level txt | Text txt -> "<p>" + txt + "</p>" | HorizontalLine -> "<hr/>" match
  • 45. let add = function | 0, y -> y | x, 0 -> x | x, y -> x + y function
  • 46. match function match let add tpl = match tpl with | x, y -> x + y function let add = function | x, y -> x + y
  • 47. type t = { Tag: int; Value: int } let value { Value = v } = v
  • 48. match match let add tpl = match tpl with | x, y -> x + y function let add = function | x, y -> x + y let add (x, y) = x + y
  • 49. Person type Name = { FirstName: string LastName: string } type Person = { Name: Name; Age: int } let f x = let { Name = { FirstName = fn } } = x fn
  • 50. F#
  • 51. Maybe type MaybeBuilder() = member this.Bind(x, f) = x |> Option.bind f member this.Return(x) = Some x let maybe = MaybeBuilder() let plus db = maybe { let! x = db |> Map.tryFind "x" let! y = db |> Map.tryFind "y" return x + y }
  • 52.
  • 53. Map-Reduce ( ) fold reduce fold
  • 54. fold reduce fold reduce
  • 55. F# fold reduce > List.fold;; val it : ((’a -> ’b -> ’a) -> ’a -> ’b list -> ’a) = <fun:clo@1> > List.reduce;; val it : ((’a -> ’a -> ’a) -> ’a list -> ’a) = <fun:clo@2-1> fold reduce list list
  • 56. fold
  • 57. fold
  • 58. fold
  • 59. fold
  • 62. fold sum sum let sum xs = List.fold (+) 0 xs
  • 63. fold forall forall let forall p xs = xs |> List.fold (fun acc x -> acc && (p x)) true exists
  • 64. fold map map let map f xs = ([], xs) ||> List.fold (fun acc x -> acc @ [f x] )
  • 65. fold filter filter let filter p xs = ([], xs) ||> List.fold begin acc x -> if p x then acc @ [x] else acc end
  • 66. fold fold fold( unfold) fold
  • 67. F#
  • 68. F# F# .NET
  • 69. F# F# .NET Framework
  • 70. .NET Framework 2.0 .NET Framework F#
  • 71. .NET Framework F# .NET Framework2.0 Runtime .NET Framework2.0 LINQ F # List .NET Framework 2.0 F#
  • 72. .NET Framework 4.0 F# TDDBC Tokyo 1.6 C# ( ) KeyValueTime.cs 42 SystemClock.cs 30 TddbcKeyValueStore.cs 67 F# ( ) KeyValueStore.fs 48 C# 139 F# 48
  • 73. .NET Framework 4.0 F# TDDBC Tokyo 1.6 C# ( ) KeyValueTimeTest.cs 141 SystemClockTest.cs 34 TddbcKeyValueStoreTest.cs 346 ( ) F# ( ) KeyValueStore.fs 170 C# 521 F# 170
  • 75. F# .NET F# option
  • 76. F# C# VB
  • 77. .NET C# VB
  • 78. F# list F# dll array seq
  • 79. static NewHoge Tag IsHoge F#
  • 80. module Hoge let plus10 = ((+)10) Hoge.plus10 FSharp.Core.FSharpFunc FSharp.Core.dll
  • 81. NParsec FParsec
  • 82.
  • 83. yacc lex yacc lex
  • 84. BNF
  • 86. NParsec parsec .NET C# C# Java Scanner
  • 87. FParsec parsec .NET F#
  • 88. NParsec FParsec
  • 89. NParsec var lazyexpr = new Parser<double>[1]; var plazyexpr = Parsers.Lazy<double>(() => lazyexpr[0] ); var pterm = plazyexpr.Between(popen, pclose) | pnum; var pexpr = ... lazyexpr[0] = pexpr;
  • 90. FParsec let pexpr, exprref = createParserForwardedToRef() let pterm = pexpr |> between popen pclose <|> pnum do exprref := ...
  • 91. F# 10 C# 54 C# Visitor
  • 92. C# F#
  • 93. NParsec Bind return Parsers.Return(...) FParsec
  • 95.
  • 96.
  • 97.
  • 98. F# FParsec F#