Set 10 Flashcards
What is a first class object?
First class objects are objects which may:
- R - be returned in function calls
- A - be assigned as arguments
- V - be assigned to a variable
- E - appear in expressions
Functions are first-class objects in functional programming languages
What does function application mean?
Applying a function to its arguments
What does partial function application mean?
Parțial function application means only applying a function to some of its arguments. The result is a function.
What is functional composition?
- Combining two functions to get a new function
- g*f means apply f first, then g
Describe in words what map
does
Applies a given function to each element of a list, returning a list of results
Describe in words what filter
does
Processes a list to produce a new list containing exactly those elements that match a given condition
Describe in words what fold
does
Reduces a list of values to a single value by repeatedly applying a combining function to the list values
What is the purpose of a domain name?
- A domain name identifies an organisation or individual on the internet.
- They use alphanumeric characters which make them easier for humans to remember than IP addresses
What is the purpose of a domain name server?
To translate a fully qualified domain name into its corresponding IP address
What is the domain name system?
- The domain name system is a distributed database of mappings from FQDNs to their corresponding IP addresses
- DNS servers are organised into a hierarchy
What happens is a domain name server cannot resolve a lookup?
The query will be passed to another DNS server
Who manages top level domains?
- An (internet) registry
- Each TLD may have restrictions as to who can use it
What is the main responsibility of an internet registry?
To maintain a definitive register of who owns a specific domain.
Give two examples of top level domains
.uk .org
What is meant by baud rate?
The maximum number of signal changes in a medium per second
What is meant by bit rate?
The number of bits transmitted over a medium per second
Bit rate equation
bit rate of channel = (baud rate) x (number of bits per signal change)
What is Serial Data Transmission?
Bits are sent one after the other over a single wire from source to destination
What is Parallel Data transmission?
- Multiple bits are sent simultaneously over multiple wires from source to destination
- Each bit is sent down a different wire
2 problems with Parallel Data transmission
- Unreliable because of skew
- Parallel wires also suffer from crosstalk
What is skew?
As each wire has slightly different properties, there is a possibility bits could travel different speeds over each of the wires and arrive at different times, meaning the signals might overlap
What is cross-talk?
Interference between different lines, which causes data corruption