All Projects → andyscott → Scala Whats That Called

andyscott / Scala Whats That Called

What do you call that?... for Scala

Programming Languages

scala
5932 projects

Labels

Projects that are alternatives of or similar to Scala Whats That Called

Activiti 7 Developers Guide
https://activiti.gitbook.io/activiti-7-developers-guide/
Stars: ✭ 120 (-25%)
Mutual labels:  guide
React Redux Typescript Guide
The complete guide to static typing in "React & Redux" apps using TypeScript
Stars: ✭ 11,621 (+7163.13%)
Mutual labels:  guide
Digital video introduction
A hands-on introduction to video technology: image, video, codec (av1, vp9, h265) and more (ffmpeg encoding).
Stars: ✭ 12,184 (+7515%)
Mutual labels:  guide
Frontend
18F's Front End Guild –  content has been moved to https://github.com/18F/development-guide
Stars: ✭ 126 (-21.25%)
Mutual labels:  guide
Express Env Example
A sample express environment that is well architected for scale. Read about it here:
Stars: ✭ 130 (-18.75%)
Mutual labels:  guide
Cocoapods Tips
iOS 라이브러리를 관리하는 CocoaPods Tip정보 모음입니다.
Stars: ✭ 141 (-11.87%)
Mutual labels:  guide
The Math Behind A Neural Network
📄 The math behind the neural network used for Olivia
Stars: ✭ 119 (-25.62%)
Mutual labels:  guide
Restful Api With Laravel Definitive Guide
Repository with the base code for the course "RESTful API with Laravel - Definitive-Guide"
Stars: ✭ 156 (-2.5%)
Mutual labels:  guide
Golang For Nodejs Developers
Examples of Golang compared to Node.js for learning
Stars: ✭ 2,698 (+1586.25%)
Mutual labels:  guide
Guide To Allyship
Guide to Allyship, an open source guide teaching you how to be a better ally.
Stars: ✭ 144 (-10%)
Mutual labels:  guide
Kotlin Quick Guide
A quick guide to Kotlin for developers.
Stars: ✭ 127 (-20.62%)
Mutual labels:  guide
Guidetomastodon
An increasingly less-brief guide to Mastodon
Stars: ✭ 129 (-19.37%)
Mutual labels:  guide
Vuecommunity
Vue.js community and ecosystem guide, written and maintained by the community itself
Stars: ✭ 143 (-10.62%)
Mutual labels:  guide
Guides
A repository of technical guides for various technologies
Stars: ✭ 122 (-23.75%)
Mutual labels:  guide
Bioc Refcard
Bioconductor cheat sheet
Stars: ✭ 152 (-5%)
Mutual labels:  guide
Guidepages
引导页/首次安装引导页/渐变引导页/APP介绍页/功能介绍页
Stars: ✭ 119 (-25.62%)
Mutual labels:  guide
Git Commands
👨🏾‍💻 The main git commands that every developer should know.
Stars: ✭ 137 (-14.37%)
Mutual labels:  guide
Vim Galore
🎓 All things Vim!
Stars: ✭ 12,610 (+7781.25%)
Mutual labels:  guide
Rakuguide
The Raku Guide
Stars: ✭ 155 (-3.12%)
Mutual labels:  guide
Cpp Quick Reference
C++ Quick Reference
Stars: ✭ 144 (-10%)
Mutual labels:  guide

What's that called?

What's the name of that operator/symbol/syntax/thing, for Scala.

General

Syntax Example Name
_* foo(myValues: _*) vararg expansion
: def fun[A: Foo](a: A) context bound
<: def fun[A <: B](a: A) upper bound
>: def fun[A >: B](a: A) lower bound
<% def fun[A <% B](a: A) view bound
Operator Example Name also known as...
== if (a == b) equals
>>= list1 >>= fun1 monad bind flatMap
>> list1 >> fun2 monad sequence followedBy
|@| (Some(3) |@| Some(5)) {_ + _} applicative builder Cinnabon, Scream, Admiral Ackbar,
Home Alone/Macaulay Culkin
:: 1 :: 2 :: 3 :: Nil cons

SBT Keys

Operator What??
:= assign
+= append
++= append
~= transform
<<= compute
<++= compute values then append

--

General Usages

|@| applicative builder

Using Cats:

import cats._
import cats.instances.option._
import cats.syntax.cartesian._

(Option(1) |@| Option(2)) map (_ + _)
// > res4: Option[Int] = Some(3)

:: cons

In standard Scala:

val list1 = List(1, 2, 3)
// > list1: List[Int] = List(1, 2, 3)
val list2 = 1 :: 2 :: 3 :: Nil
// > list2: List[Int] = List(1, 2, 3)

>>= monad bind

Using Cats:

import cats.instances.all._
import cats.syntax.flatMap._

List(1, 2, 3) >>= { (x: Int) => List(x, x + 1) }
// > res0: List[Int] = List(1, 2, 2, 3, 3, 4)

>> monad sequence

This is very similar to a monad bind, except the result of the first action is discarded.

Using Cats:

import cats.instances.all._
import cats.syntax.flatMap._

List(1, 2, 3) >> { List(2, 2) }
// > res0: List[Int] = List(2, 2, 2, 2, 2, 2)

_* vararg expansion

def foo(args: String*) = args.map(_.length)
val input = List("hello", "world")

foo(input: _*)
// > res0: Seq[Int] = List(5, 5)

: <: >: <% context/lower/upper/view bounds

TODO

--

SBT Key Usages

:= assign key value

name := "fooproject"

The assignment operator can also be used to compute or transform values using the .value macro.

organization := name.value
// or
organization := { "hello" + name.value }

+= / ++= append key value

// appending one item to a key
sourceDirectories in Compile += new File("source")
// appending several items to a key
sourceDirectories in Compile ++= Seq(file("sources1"), file("sources2"))

~= transform key value

name ~= { _.toUpperCase }

<<= compute new key value

name <<= (name, organization, version) { (n, o, v) => "project " + n + " from " + o + " version " + v }

<++= compute values then append to key

// val watchSources: TaskKey[Seq[File]] = // ...
watchSources in ConfigGlobal <++= unmanagedSources

This is the same thing as:

watchSources in ConfigGlobal ++= unmanagedSources.value
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].