emoji extracted from: https://www.buzzfeed.com/nathanwpyle/20-emojis-every-texan-wish-existed
128x128 png: http://i.imgur.com/J7aWlvq.png
#!/usr/bin/env bash | |
: "${SLACK_API_TOKEN:?Need to set SLACK_API_TOKEN environment variable}" | |
STATUS=$(/usr/bin/osascript <<"EOF" | |
if application "Spotify" is running and application "Slack" is running then | |
tell application "Spotify" | |
set currentArtist to artist of current track as string | |
set currentSong to name of current track as string | |
return currentArtist & " - " & currentSong |
emoji extracted from: https://www.buzzfeed.com/nathanwpyle/20-emojis-every-texan-wish-existed
128x128 png: http://i.imgur.com/J7aWlvq.png
Copyright © 2017 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