PLNC 2010

Site pédagogique de l'unité d'enseignement INF355 (Paradigmes et Langages Non Classiques) de Télécom ParisTech.

Factor : cours 2 (16 juin 2010)

pre.code {
border:1px dashed #ccc;
background-color:#f5f5f5;
padding:5px;
font-size:150%;
color:#000000;
}

.NULL {
color: #000000;
}
.COMMENT1 {
color: #cc0000;
}
.COMMENT2 {
color: #ff8400;
}
.COMMENT3 {
color: #6600cc;
}
.COMMENT4 {
color: #cc6600;
}
.DIGIT {
color: #ff0000;
}
.FUNCTION {
color: #9966ff;
}
.INVALID {
background: #ffffcc;
color: #ff0066;
}
.KEYWORD1 {
color: #006699;
font-weight: bold;
}
.KEYWORD2 {
color: #009966;
font-weight: bold;
}
.KEYWORD3 {
color: #0099ff;
font-weight: bold;
}
.KEYWORD4 {
color: #66ccff;
font-weight: bold;
}
.LABEL {
color: #02b902;
}
.LITERAL1 {
color: #ff00cc;
}
.LITERAL2 {
color: #cc00cc;
}
.LITERAL3 {
color: #9900cc;
}
.LITERAL4 {
color: #6600cc;
}
.MARKUP {
color: #0000ff;
}
.OPERATOR {
color: #000000;
font-weight: bold;
}

body, button {
font:9pt « Lucida Grande », « Lucida Sans [...]

Factor : note de cours 1 (9 juin 2010)

pre.code {
border:1px dashed #ccc;
background-color:#f5f5f5;
padding:5px;
font-size:150%;
color:#000000;
}

.NULL {
color: #000000;
}
.COMMENT1 {
color: #cc0000;
}
.COMMENT2 {
color: #ff8400;
}
.COMMENT3 {
color: #6600cc;
}
.COMMENT4 {
color: #cc6600;
}
.DIGIT {
color: #ff0000;
}
.FUNCTION {
color: #9966ff;
}
.INVALID {
background: #ffffcc;
color: #ff0066;
}
.KEYWORD1 {
color: #006699;
font-weight: bold;
}
.KEYWORD2 {
color: #009966;
font-weight: bold;
}
.KEYWORD3 {
color: #0099ff;
font-weight: bold;
}
.KEYWORD4 {
color: #66ccff;
font-weight: bold;
}
.LABEL {
color: #02b902;
}
.LITERAL1 {
color: #ff00cc;
}
.LITERAL2 {
color: #cc00cc;
}
.LITERAL3 {
color: #9900cc;
}
.LITERAL4 {
color: #6600cc;
}
.MARKUP {
color: #0000ff;
}
.OPERATOR {
color: #000000;
font-weight: bold;
}

body, button {
font:9pt « Lucida Grande », « Lucida Sans [...]

Scala : notes de cours 2 (4 juin 2010)

package net.rfc1149.cours2
 
import scala.actors.{Actor,Futures,Scheduler,TIMEOUT}
import Futures._
 
// Demonstration of object unbuilding using unapply.
// This will be used for pattern matching.
 
object TripleOf {
 
def apply(n: Int): Int = 3 * n
 
def unapply(n: Int): Option[Int] =
if (n % 3 == 0) Some(n/3) else None
 
}
 
// Simple matching returning a boolean, no possibility of variable [...]

Scala : notes de cours 1 (21 mai 2010)

Voici les notes de cours d’Alexandre Bertails.

// * syntaxe
 
// light
var capital = Map("US" -> "Washington", "France" -> "Paris")
capital += ("Japan" -> "Tokyo")
println(capital("France"))
 
// function
def factorial(x: BigInt): BigInt =
if (x == 0) 1 else x * factorial(x – 1)
 
// multiline
val s = """
ici
la
"""
 
// val / var
 
Map -> mutable and immutable
 
// this is Java
 
class Rational {
[...]

Scheme : notes de cours 2

; Suite au TD, voici une manière d’implémenter une fonction récursive
; non nommée qui s’invoque elle-même sans utiliser de boucle nommée.
; Implémentation et test de "while" en utilisant cette fonction.
; Stockage d’une continuation dans la variable globale "x". On
; peut invoquer "(example)", puis "(x 42)" pour en voir l’effet.
"Hello, world!\n"; Les continuations stoquent également l’arbre [...]

Scheme : notes de cours 1

Ces notes ne reprennent pas les types de base de Scheme et les prédicats d’équivalence.

; Définition simple: dans toute la suite, "three" est lié à la valeur 3.
; Définition de "plus" comme ayant la valeur de la procédure "+".
; Définition simple d’une fonction définissant un calcul.
; Définition compacte de la même fonction.
; "adder" renvoie une [...]