- Redbook
- Advanced Scala with Cats
- Functional Programming for Mortals
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# content has to be in .config/fish/config.fish | |
# if it does not exist, create the file | |
setenv SSH_ENV $HOME/.ssh/environment | |
function start_agent | |
echo "Initializing new SSH agent ..." | |
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV | |
echo "succeeded" | |
chmod 600 $SSH_ENV | |
. $SSH_ENV > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set serveroutput on; | |
declare | |
raw_guid raw(16); | |
guid varchar2(64); | |
begin | |
raw_guid := guid_to_raw ('88c6a267-65d2-48d6-8da2-6f45e2c22726'); | |
guid := raw_to_guid('67A2C688D265D6488DA26F45E2C22726'); | |