2020年秋学期 - 関数型プログラミング / FUNCTIONAL PROGRAMMING
|
C2074 関数型プログラミング FUNCTIONAL PROGRAMMING |
特設科目 Special Seminars 2 単位 |
| 実施形態 | 完全オンライン |
| 開催日程 | 秋学期 火曜日3時限 |
| 担当教員 | 萩野 達也(ハギノ タツヤ) |
| 関連科目 |
前提科目(推奨): B4002,B4001 前提科目(関連): C2101,C2073,C2072,B6135,B4005,B4004,B4003 |
| 開講場所 | SFC |
| 授業形態 | 講義、実習・演習 |
| 履修者制限 |
履修人数を制限する Only the selected students can take this course. |
| 履修条件 |
You must have earned credits of "Fundamentals of Information Technology 1/Fundaentals of Information Technology" excluding those who failed typing exam or passed the qualification examination. If you have knowledge equivalent to "Fundamentals of Information Technology 2" about programming, you can take this course, otherwise it is strongly recommended to take "Fundamentals of Information Technology 2" beforehand. 「情報基礎1/情報基礎」の単位を取得していること(ただしタイピング試験不合格者は履修不可)。プログラミングについて「情報基礎2」相当の知識があれば履修が可能だが、そうでなければ「情報基礎2」の履修を強く推奨する。 |
| 使用言語 | 英語 |
| 連絡先 | hagino@sfc.keio.ac.jp |
| 授業ホームページ | https://web.sfc.keio.ac.jp/~hagino/fp20/ |
| 同一科目 | |
| 学生が利用する予定機材/ソフト等 |
Haskell, Text Editor Haskell, テキストエディタ |
| 設置学部・研究科 | 総合政策・環境情報学部 |
| 大学院プロジェクト名 | |
| 大学院プロジェクトサブメンバー | |
| ゲストスピーカーの人数 | 0 |
| 履修選抜・課題タイプ=テキスト登録可 | false |
| 履修選抜・選抜課題タイプ=ファイル登録可 | false |
| GIGAサティフィケート対象 | true |
| 最終更新日 | 2020/07/13 16:30:09 |
科目概要
Most of the programming languages including C and Java are procedural, but this class deals with functional programming languages which are built on top of totally different concept from procedural ones. In function programming languages, programs are constructed by combining functions. Functions are treated as ordinal values and higher order functions make programs simple for complicated problems.
C言語やJavaなどほとんどのプログラミング言語は手続き型プログラミング言語であるが,この授業では手続き型とは全く異なった考え方を持って作られている関数型プログラミング言語について学ぶ.関数型プログラミング言語では,関数を組み合わせることでプログラムを書き,関数を評価することで計算を行う.関数自身を値と考えて取り扱うこともでき,複雑な処理を高階関数を使うことで簡単に書くことができる.
授業シラバス
主題と目標/授業の手法など
It is very important to know there are programming languages of which principle is different from that of procedural programming languages like C, Java, BASIC, FORTRAN and so on. In this lecture, we will study Haskell. Haskell is a quite unique programming language not only because it is a functional programming language, but also its evaluation is lazy and it also use Monad to handle side effects. It may be totally new experience of writing programs in Haskell.
プログラミング言語には,C言語やJavaやBASICやFORTRANなどの使い慣れた手続き型以外の言語も多く存在します.この授業では関数型プログラミング言語であるHaskellについて学びます.Haskellは関数型であるだけなく,遅延評価やMonadを使うことで副作用を表すなど,面白い機能が色々あります.Haskellでプログラムを書くことはこれまでのプログラミングとは全く異なるかもしれません.
教材・参考文献
Bryan O'Sullivan, Don Stewart, and John Goerzen ``Real World Haskell'' O'Reilly
Miran Lipovača ``Learn You a Haskell for Great Good!'' No Starch Press
Richard Bird ``Introduction to Functional Programming using Haskell'' Prentice Hall
提出課題・試験・成績評価の方法など
There will be a final examination as well as home works for each week.
毎週の課題および最終試験の結果で評価します.
履修上の注意
You need to install Haskell in your PC. The Haskell platform is available on Windows, OS X and Linux.
Haskellの処理系を自分のPCにインストールする必要があります.HaskellはWindows, MacおよびLinuxで利用可能です.
授業計画
第1回 Introduction to Haskell
[Haskellの概要]
Install Haskell Platform into your PC and write several simple first programs in Haskell.
Haskell PlatformをPCにインストールし,簡単なプログラムを書いてみます.
第2回 Basic(1) Function and List
[Haskellの基礎(1) 関数とリスト]
Study basic use of functions and lists in Haskell.
Haskellにおける関数とリストについて学びます.
第3回 Basic(2) Type and Higher Order Function
[Haskellの基礎(2) 型と高階関数]
Understand type and study functions as values.
型と関数について学びます.
第4回 Basic(3) Module and Exercise
[Haskellの基礎(3) モジュールと総合演習]
Study module and conduct general exercise to check what we have studied.
ここまでに学んだ内容について確認の総合演習をします.
第5回 Lazy Evaluation
[遅延評価]
Study evaluation mechanism of Haskell.
Haskellの評価方法である遅延評価について学びます.
第6回 Basic Values
[基本的な値]
Study boolean, integer, character, string, tuple and list.
真偽値,整数,文字,文字列,タプル,リストなどについて学びます.
第7回 Basic Syntax
[基本的な構文]
Study syntax of writing functions in Haskell.
関数を書くための構文について学びます.
第8回 Functions
[関数]
Study functions more deeply.
関数についてさらに深く学びます.
第9回 Type and Class
[型と型クラス]
Define new type and introduce type class.
新しい型の定義の仕方と,型クラスについて学びます.
第10回 Module
[モジュール]
Study about modules.
モジュールの使い方,定義の仕方について学びます.
第11回 Monad
[モナド]
Study Monad: Maybe, List, IO.
Maybe, List, IOなどのモナドとその構文について学びます.
第12回 Exercise (1)
[演習(1)]
Solve some problems using Haskell.
Haskellを使った演習を行います.
第13回 Exercise (2)
[演習(2)]
Solve some problems using Haskell.
Haskellを使った演習を行います.
第14回 Exercise (3)
[演習(3)]
Solve some problems using Haskell.
Haskellを使った演習を行います.
第15回 Exercise (4)
[演習(4)]
Solve some problems using Haskell.
Haskellを使った演習を行います.
15回目に相当するその他の授業計画