RU beehive logo ITEC dept promo banner
ITEC 380
2012fall
ibarland
tlewis32

homelecturesexamshwsbreeze (snow day)

lect01c
Racket intro continued: functions

  Review: uses prefix notation,
   exact rationals [compare scheme vs Java vs ...]
Let's write some functions:


Last time we saw:

I. define
(define a 2)
(define b 8)
(define c 42)
; quadratic expression



Let's turn our answer into a function (w/ some test cases):

II. define a function
(define (root1 a b c)
  ...)



  
; Define:
;    statically typed
;    type safety
;    untyped
; Java/Racket vs C vs assembly (and nearly php)
; "Strongly typed" sometimes means either

III. practice: string functions
blend : string, string -> string

IIIa: expected results
IIIb: write
IIIc: expected results w/ 'string=?'; expected results w/ check-expect

homelecturesexamshwsbreeze (snow day)


©2012, Ian Barland, Radford University
Last modified 2012.Sep.10 (Mon)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Powered by PLT Scheme