tailieunhanh - How to Design Programs Languages phần 10
, và sự chú ý chi tiết quan trọng đối với tất cả mọi người, các lập trình viên máy tính không chỉ trong tương lai. Cuốn sách cho thấy nhiều người đọc hai về cơ bản những ý tưởng mới. Đầu tiên, nó trình bày các hướng dẫn thiết kế chương trình cho người đọc làm thế nào để phân tích một tuyên bố vấn đề, | compose Y-1 - Z Y-N - Y-N-1 X-1 . X-N - Y-N - X-1 . X-N - Z Purpose to compose a sequence of procedures into a single procedure filter X - boolean listof X - listof X Purpose to construct a list from all those items on a list for which the predicate holds foldl X Y - Y Y listof X - Y Purpose foldl f base list x-1 . x-n f x-n . f x-1 base foldr X Y - Y Y listof X - Y Purpose foldr f base list x-1 . x-n f x-1 . f x-n base for-each any . - any listof any . - void Purpose to apply a function to each item on one or more lists for effect only map X . - Z listof X . - listof Z Purpose to construct a new list by applying a function to each item on one or more existing lists memf X - boolean listof X - union false listof X Purpose to determine whether the first argument produces true for some value in the second argument ormap X - boolean listof X - boolean 155 Purpose ormap p list x-1 . x-n or p x-1 or . p x-n procedure any - boolean Purpose to determine if a value is a procedure quicksort listof X X X - boolean - listof X Purpose to construct a list from all items on a list in an order according to a predicate sort listof X X X - boolean - listof X Purpose to construct a list from all items on a list in an order according to a predicate display any - void Purpose to print the argument to stdout without quotes on symbols and strings etc. newline - void Purpose to print a newline to stdout pretty-print any - void Purpose like write but with standard newlines and indentation print any - void Purpose to print the argument as a value to stdout printf string any . - void Purpose to format the rest of the arguments according to the first argument and print it to stdout read - sexp Purpose to read input from the user 156 write any - void Purpose to print the argument to stdout in a traditional style that is somewhere between print and display build-vector nat nat - X - vectorof X Purpose to construct a vector make-vector number X - vectorof X Purpose to construct a vector vector
đang nạp các trang xem trước