By: Matt Barackman
A collection of objects or case classes that share a sealed trait.
In the example below, the type family would be a collection of traffic light colors with Red
, Yellow
, and Green
as member objects.
#![feature(core_intrinsics)] | |
struct Something | |
{ | |
data:u32, | |
} | |
impl Something | |
{ | |
pub fn name(&self)->String |
By: Matt Barackman
A collection of objects or case classes that share a sealed trait.
In the example below, the type family would be a collection of traffic light colors with Red
, Yellow
, and Green
as member objects.
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
#!/bin/zsh | |
cd /tmp | |
wget http://download.springsource.com/release/ECLIPSE/neon/R/eclipse-jee-neon-R-linux-gtk-x86_64.tar.gz | |
# eclipse EE | |
# http://download.springsource.com/release/ECLIPSE/neon/3/eclipse-jee-neon-3-linux-gtk-x86_64.tar.gz | |
tar -zxf eclipse-jee-neon-R-linux-gtk-x86_64.tar.gz -C /opt |
This is my attempt to give Scala newcomers a quick-and-easy rundown to the prerequisite steps they need to a) try Scala, and b) get a standard project up and running on their machine. I'm not going to talk about the language at all; there are plenty of better resources a google search away. This is just focused on the prerequisite tooling and machine setup. I will not be assuming you have any background in JVM languages. So if you're coming from Python, Ruby, JavaScript, Haskell, or anywhere… I hope to present the information you need without assuming anything.
Disclaimer It has been over a decade since I was new to Scala, and when I was new to Scala, I was coming from a Java and Ruby background. This has probably caused me to unknowingly make some assumptions. Please feel free to call me out in comments/tweets!
One assumption I'm knowingly making is that you're on a Unix-like platform. Sorry, Windows users.
/************************************** | |
* Header Counters in TOC | |
**************************************/ | |
/* No link underlines in TOC */ | |
.md-toc-inner { | |
text-decoration: none; | |
} | |
.md-toc-content { |
# One liner | |
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
# Explained | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. |
# got to handle both escaped and literal | |
df.replace(to_replace=[r"\\t|\\n|\\r", "\t|\n|\r"], value=["",""], regex=True, inplace=<INPLACE>) |
<# | |
.SYNOPSIS | |
Script to Initialize my custom powershell setup. | |
.DESCRIPTION | |
Script uses scoop | |
.NOTES | |
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted. | |
Author: Mike Pruett | |
Date: October 18th, 2018 |