Modul : Struktur
automatic deallocation
garbage collection
3. KERUGIAN
Terlalu banyak simbol ()
Lambat untuk perhitungan numerik
Tidak mempunyai tipe (type)
4. KEUNTUNGAN
Baik untuk symbolic processing (Artificial Intelligence)
Contoh Pemrograman Fungsional: LISP (List Programming)
(define pi 3.14159)
( quote pi)
(define f *)
(define f '*)
fungsi f, penggunaannya (f 2 3) 6
f sebagai simbol, beda dengan f di atas
6. LATIHAN
Ubahlah notasi infix berikut kedalam notasi prefix (LISP).
(1 + 2) > (8 - 3)
Penyelesaian
( > (+1 2) (- 8 3) )
7. TUGAS
Ubahlah notasi infix berikut kedalam notasi prefix (LISP).
a.
2 * (3 + 1) - 2
b.
1 * 2 + 10 60 / 5