Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

OSPP MODULE 8 (1).

Rating
-
Sold
-
Pages
4
Grade
A+
Uploaded on
11-08-2024
Written in
2024/2025

Exam of 4 pages for the course OSPP105 at OSPP105 (OSPP MODULE 8 (1).)

Institution
OSPP105
Course
OSPP105

Content preview

OSPP MODULE 8
Basically, functional programming has functions that are similar to mathematical functions, as in
we have an
input which will give us a specific output. It does not concern side-effects, changing the state or
properties
of data but instead merely produces a separate result. - ANS-In short, how is the functional
programming paradigm different from the imperative programming
paradigm?

Head is the first element of the list, tail is the rest of the list. - ANS-What is meant by the head
and tail of a list?

A predicate is a function that returns true or false. any (example function) is true if there is a
term X
in the list such that P(X) is true. - ANS-What is meant by a predicate?

The number of parameters to a function. - ANS-What is meant by arity?

Takes a function as an argument, for example foldl. Can also be something that returns a
function as
its result. - ANS-What is meant by a higher order function?

A function that is not bound to an identifier. - ANS-What is meant by an anonymous function?

They are often used as arguments to higher order functions. - ANS-How does anonymous
functions relate to higher order functions?

map: Applies a function to every element in a list.
filter: Takes a predicate, a list and returns a list of all elements that satisfy the predicate.

zip: Combines two lists (for examples containing x's and y's) into a list containing tuples where
the first
tuple contains (x1,y1).

fold: Takes a function, accumulator and a list. Applies the function between each element of the
list
and stores the result in the accumulator. - ANS-Four common operations on lists are: map, filter,
zip, and fold. In brief, describe these operations.

A function calls upon itself inside it. - ANS-In computer science, what is meant by recursion?

Document information

Uploaded on
August 11, 2024
Number of pages
4
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
CA$12.14
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Thumbnail
Package deal
OSPP105
-
11 2024
CA$ 133.55 More info

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
topgradesdr Jackson State University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1549
Member since
2 year
Number of followers
9
Documents
16692
Last sold
14 hours ago
TOPGRADES DOCTOR

Hi there! I'm an experienced academic professional specializing in exam preparation, test banks, and assignments. Whether you're gearing up for a big test, looking for top-notch study guides, or need expertly crafted assignments, I've got you covered. My materials are: Accurate and Comprehensive: Designed to help you excel in your studies. Tailored to Your Needs: Covering various subjects with real exam-style questions and solutions. Time-Saving: Concise, easy-to-understand resources to help you study smarter. Let me help you achieve your academic goals with confidence!

Read more Read less
4.8

302 reviews

5
262
4
24
3
8
2
2
1
6

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions