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

Laravelでfacadeを使わない開発
Laravelでfacadeを使わない開発Laravelでfacadeを使わない開発
Laravelでfacadeを使わない開発Kenjiro Kubota
 
関数型プログラミングのデザインパターンひとめぐり
関数型プログラミングのデザインパターンひとめぐり関数型プログラミングのデザインパターンひとめぐり
関数型プログラミングのデザインパターンひとめぐりKazuyuki TAKASE
 
120901fp key
120901fp key120901fp key
120901fp keyksknac
 
すごい配列楽しく学ぼう
すごい配列楽しく学ぼうすごい配列楽しく学ぼう
すごい配列楽しく学ぼうxenophobia__
 
関数プログラミング入門
関数プログラミング入門関数プログラミング入門
関数プログラミング入門Hideyuki Tanaka
 
最強オブジェクト指向言語 JavaScript 再入門!
最強オブジェクト指向言語 JavaScript 再入門!最強オブジェクト指向言語 JavaScript 再入門!
最強オブジェクト指向言語 JavaScript 再入門!Yuji Nojima
 
今から始める Lens/Prism
今から始める Lens/Prism今から始める Lens/Prism
今から始める Lens/PrismNaoki Aoyama
 
"Simple Made Easy" Made Easy
"Simple Made Easy" Made Easy"Simple Made Easy" Made Easy
"Simple Made Easy" Made EasyKent Ohashi
 
Responsableを使ったadr実装
Responsableを使ったadr実装Responsableを使ったadr実装
Responsableを使ったadr実装Kenjiro Kubota
 
コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門潤一 加藤
 
ハンドノート T字形ERモデル セミナー資料 (Author; S.Toriyabe SYSTEMS DESIGN Co.,Ltd. Japan)
ハンドノート T字形ERモデル セミナー資料 (Author; S.Toriyabe  SYSTEMS DESIGN Co.,Ltd. Japan) ハンドノート T字形ERモデル セミナー資料 (Author; S.Toriyabe  SYSTEMS DESIGN Co.,Ltd. Japan)
ハンドノート T字形ERモデル セミナー資料 (Author; S.Toriyabe SYSTEMS DESIGN Co.,Ltd. Japan) 聡 鳥谷部
 
並列プログラミング 入門!&おさらい!
並列プログラミング入門!&おさらい!並列プログラミング入門!&おさらい!
並列プログラミング 入門!&おさらい!道化師 堂華
 
系統程式 -- 第 9 章 虛擬機器
系統程式 -- 第 9 章 虛擬機器系統程式 -- 第 9 章 虛擬機器
系統程式 -- 第 9 章 虛擬機器鍾誠 陳鍾誠
 
いまさら聞けないselectあれこれ
いまさら聞けないselectあれこれいまさら聞けないselectあれこれ
いまさら聞けないselectあれこれlestrrat
 
関数型プログラミング入門 with OCaml
関数型プログラミング入門 with OCaml関数型プログラミング入門 with OCaml
関数型プログラミング入門 with OCamlHaruka Oikawa
 
最新C++事情 C++14-C++20 (2018年10月)
最新C++事情 C++14-C++20 (2018年10月)最新C++事情 C++14-C++20 (2018年10月)
最新C++事情 C++14-C++20 (2018年10月)Akihiko Matuura
 
Effective Modern C++ 勉強会#1 Item3,4
Effective Modern C++ 勉強会#1 Item3,4Effective Modern C++ 勉強会#1 Item3,4
Effective Modern C++ 勉強会#1 Item3,4Takashi Hoshino
 
オブジェクト指向できていますか?
オブジェクト指向できていますか?オブジェクト指向できていますか?
オブジェクト指向できていますか?Moriharu Ohzu
 

What's hot (20)

Laravelでfacadeを使わない開発
Laravelでfacadeを使わない開発Laravelでfacadeを使わない開発
Laravelでfacadeを使わない開発
 
関数型プログラミングのデザインパターンひとめぐり
関数型プログラミングのデザインパターンひとめぐり関数型プログラミングのデザインパターンひとめぐり
関数型プログラミングのデザインパターンひとめぐり
 
120901fp key
120901fp key120901fp key
120901fp key
 
すごい配列楽しく学ぼう
すごい配列楽しく学ぼうすごい配列楽しく学ぼう
すごい配列楽しく学ぼう
 
関数プログラミング入門
関数プログラミング入門関数プログラミング入門
関数プログラミング入門
 
最強オブジェクト指向言語 JavaScript 再入門!
最強オブジェクト指向言語 JavaScript 再入門!最強オブジェクト指向言語 JavaScript 再入門!
最強オブジェクト指向言語 JavaScript 再入門!
 
Map
MapMap
Map
 
今から始める Lens/Prism
今から始める Lens/Prism今から始める Lens/Prism
今から始める Lens/Prism
 
"Simple Made Easy" Made Easy
"Simple Made Easy" Made Easy"Simple Made Easy" Made Easy
"Simple Made Easy" Made Easy
 
Responsableを使ったadr実装
Responsableを使ったadr実装Responsableを使ったadr実装
Responsableを使ったadr実装
 
コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門
 
Oss貢献超入門
Oss貢献超入門Oss貢献超入門
Oss貢献超入門
 
ハンドノート T字形ERモデル セミナー資料 (Author; S.Toriyabe SYSTEMS DESIGN Co.,Ltd. Japan)
ハンドノート T字形ERモデル セミナー資料 (Author; S.Toriyabe  SYSTEMS DESIGN Co.,Ltd. Japan) ハンドノート T字形ERモデル セミナー資料 (Author; S.Toriyabe  SYSTEMS DESIGN Co.,Ltd. Japan)
ハンドノート T字形ERモデル セミナー資料 (Author; S.Toriyabe SYSTEMS DESIGN Co.,Ltd. Japan)
 
並列プログラミング 入門!&おさらい!
並列プログラミング入門!&おさらい!並列プログラミング入門!&おさらい!
並列プログラミング 入門!&おさらい!
 
系統程式 -- 第 9 章 虛擬機器
系統程式 -- 第 9 章 虛擬機器系統程式 -- 第 9 章 虛擬機器
系統程式 -- 第 9 章 虛擬機器
 
いまさら聞けないselectあれこれ
いまさら聞けないselectあれこれいまさら聞けないselectあれこれ
いまさら聞けないselectあれこれ
 
関数型プログラミング入門 with OCaml
関数型プログラミング入門 with OCaml関数型プログラミング入門 with OCaml
関数型プログラミング入門 with OCaml
 
最新C++事情 C++14-C++20 (2018年10月)
最新C++事情 C++14-C++20 (2018年10月)最新C++事情 C++14-C++20 (2018年10月)
最新C++事情 C++14-C++20 (2018年10月)
 
Effective Modern C++ 勉強会#1 Item3,4
Effective Modern C++ 勉強会#1 Item3,4Effective Modern C++ 勉強会#1 Item3,4
Effective Modern C++ 勉強会#1 Item3,4
 
オブジェクト指向できていますか?
オブジェクト指向できていますか?オブジェクト指向できていますか?
オブジェクト指向できていますか?
 

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
 
現実(えくせる)と戦う話
現実(えくせる)と戦う話現実(えくせる)と戦う話
現実(えくせる)と戦う話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
 
SCMBC闇LT資料
SCMBC闇LT資料SCMBC闇LT資料
SCMBC闇LT資料bleis 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の話
 
現実(えくせる)と戦う話
現実(えくせる)と戦う話現実(えくせる)と戦う話
現実(えくせる)と戦う話
 
ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)
ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)
ラムダでウィザード 滅せよ手続き、とチャーチは言った (※言ってません)
 
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
 
SCMBC闇LT資料
SCMBC闇LT資料SCMBC闇LT資料
SCMBC闇LT資料
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

仕事で使う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#