All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Study Help
New
Search
Search
Sign In
Register
study help
computer science
concepts of programming languages
Questions and Answers of
Concepts of Programming Languages
What is a simple list?
A functional language could use some data structure other than the list. For example, it could use strings of single-character symbols. What primitives would such a language have in place of the CAR,
Write a Scheme function that takes a simple list of numbers as a parameter and returns a list with the largest and smallest numbers in the input list.
What does the abbreviation REPL stand for?
Make a list of the features of F# that are not in ML.
Write a Scheme function that takes a list and an atom as parameters and returns a list identical to its parameter list except with all top-level instances of the given atom deleted.
What are the three parameters to IF?
If Scheme were a pure functional language, could it include DISPLAY? Why or why not?
Write a Scheme function that takes a list as a parameter and returns a list identical to the parameter except the last element has been deleted.
What are the differences between =, EQ?, EQV?, and EQUAL?
What does the following Scheme function do? (define (y s lis) (cond ( (null? lis) '0 ) ( (equal? s (car lis)) lis) (else (y s (cdr lis)) ) ))
Repeat Programming Exercise 7, except that the atom can be either an atom or a list.Data From Exercise 7:Write a Scheme function that takes a list and an atom as parameters and returns a list
What are the differences between the evaluation method used for the Scheme special form DEFINE and that used for its primitive functions?
What does the following Scheme function do? (define (x lis) (cond ( (null? lis) 0) ( (not (list? (car lis))) (cond ( (eq? (car lis) #f) (x (cdr lis))) (else (+ 1 (x (cdr lis)))))) (else (+ (x (car
Write a Scheme function that takes two atoms and a list as parameters and returns a list identical to the parameter list except all occurrences of the first given atom in the list are replaced with
What are the two forms of DEFINE?
Write a Scheme function that returns the reverse of its simple list parameter.
Describe the syntax and semantics of COND.
Write a Scheme predicate function that tests for the structural equality of two given lists. Two lists are structurally equal if they have the same list structure, although their atoms may be
Why are CAR and CDR so named?
Write a Scheme function that returns the union of two simple list parameters that represent sets.
If CONS is called with two atoms, say 'A and 'B, what is the returned?
Write a Scheme function with two parameters, an atom and a list, that returns a list identical to the parameter list except with all occurrences, no matter how deep, of the given atom deleted. The
Describe the syntax and semantics of LET in Scheme.
What are the differences between CONS, LIST, and APPEND?
Write a Scheme function that takes a simple list of numbers as its parameter and returns a list identical to the parameter list except with the numbers in ascending order.
Describe the syntax and semantics of mapcar in Scheme.
Write a Scheme function that takes a simple list of numbers as its parameter and returns the largest and smallest numbers in the list.
What is tail recursion? Why is it important to define functions that use recursion to specify repetition to be tail recursive?
Write a Scheme function that takes a simple list as its parameter and returns a list of all permutations of the given list.
Why were imperative features added to most dialects of Lisp?
Write the quicksort algorithm in Scheme.
In what ways are Common Lisp and Scheme opposites?
Rewrite the following Scheme function as a tail- recursive function: (DEFINE (doit n) (IF (= n 0) (+ n (doit (- n 1))) ))
What scoping rule is used in Scheme? In Common Lisp? In ML? In Haskell? In F#?
Write any of the first 19 Programming Exercises in F#.Data From Exercise 11:Write a Scheme function that returns the reverse of its simple list parameter.
What happens during the reader phase of a Common Lisp language processor?
Write any of the first 19 Programming Exercises in ML.
What are two ways that ML is fundamentally different from Scheme?
What is stored in an ML evaluation environment?
What is the difference between an ML val statement and an assignment statement in C?
What is type inferencing, as used in ML?
What is the use of the fn reserved word in ML?
Can ML functions that deal with scalar numerics be generic?
What is a curried function?
What does partial evaluation mean?
Describe the actions of the ML filter function.
What operator does ML use for Scheme’s CAR?
What operator does ML use for functional composition?
What are the three characteristics of Haskell that make it different from ML?
What does lazy evaluation mean?
What is a strict programming language?
What programming paradigms are supported by F#?
With what other programming languages can F# interoperate?
What does F#’s let do?
How is the scope of a F# let construct terminated?
What is the underlying difference between a sequence and a list in F#?
What is the difference between the let of ML and that of F#, in terms of extent?
What is the syntax of a lambda expression in F#?
Does F# coerce numeric values in expressions? Argue in support of the design choice.
What support does Python provide for functional programming?
What function in Ruby is used to create a curried function?
Is the use of functional programming expanding or shrinking?
What is one characteristic of functional programming languages that makes their semantics simpler than that of imperative languages?
What is the flaw in using lines of code to compare the productivity of functional languages and that of imperative languages?
Why can concurrency be easier with functional languages than imperative languages?
What are the three primary uses of symbolic logic in formal logic?
Compare the concept of data typing in C# with that of Prolog.
Using the structures parent(X, Y), male(X), and female(X), write a structure that defines mother(X, Y).
What are the two parts of a compound term?
Describe how a multiple-processor machine could be used to implement resolution. Could Prolog, as currently defined, use this method?
Using the structures parent(X, Y), male(X), and female(X), write a structure that defines sister(X, Y).
What are the two modes in which a proposition can be stated?
Write a Prolog description of your family tree (based only on facts), going back to your grandparents and including all descendants. Be sure to include all relationships.
Write a Prolog program that finds the maximum of a list of numbers.
What is the general form of a proposition in clausal form?
Write a set of rules for family relationships, including all relationships from grandparents through two generations. Now add these to the facts of Problem 3, and eliminate as many of the facts as
Write a Prolog program that succeeds if the intersection of two given list parameters is empty.
What are antecedents? Consequences?
Write the following English conditional statements as Prolog-headed Horn clauses:a. If Fred is the father of Mike, then Fred is an ancestor of Mike.b. If Mike is the father of Joe and Mike is the
Write a Prolog program that returns a list containing the union of the elements of two given lists.
Give general (not rigorous) definitions of resolution and unification.
Explain two ways in which the list-processing capabilities of Scheme and Prolog are similar.
Write a Prolog program that returns the final element of a given list.
What are the forms of Horn clauses?
In what way are the list-processing capabilities of Scheme and Prolog different?
Write a Prolog program that implements quicksort.
What is the basic concept of declarative semantics?
Write a comparison of Prolog with ML, including two similarities and two differences.
What does it mean for a language to be nonprocedural?
From a book on Prolog, learn and write a description of an occur check problem. Why does Prolog allow this problem to exist in its implementation?
What are the three forms of a Prolog term?
Find a good source of information on Skolem normal form and write a brief but clear explanation of it.
What is an uninstantiated variable?
What are the syntactic forms and usage of fact and rule statements in Prolog?
What is a conjunction?
Explain the two approaches to matching goals to facts in a database.
Explain the difference between a depth-first and a breadth-first search when discussing how multiple goals are satisfied.
Explain how backtracking works in Prolog.
What are the two ways a Prolog programmer can control the order of pattern matching during resolution?
Showing 300 - 400
of 965
1
2
3
4
5
6
7
8
9
10