Skip to content

Instantly share code, notes, and snippets.

View johnazariah's full-sized avatar

John Azariah johnazariah

  • Microsoft Corporation
  • Brisbane, Queensland, Australia
  • 22:23 (UTC +10:00)
View GitHub Profile
@richlander
richlander / modernizing-csharp9.md
Last active April 26, 2024 17:14
Modernizing a codebase for C# 9

Modernizing a codebase for C# 9

There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull example requires it.

Use the property pattern to replace IsNullorEmpty

Consider adopting the new property pattern, wherever you use IsNullOrEmpty.

string? hello = "hello world";
@johnazariah
johnazariah / .bash_profile
Last active April 11, 2025 00:55
Git Configuration
# generated by Git for Windows
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc
#from http://stackoverflow.com/questions/33220492/ps1-bash-command-substitution-not-working-on-windows-10
# Reset
Off="\[\e[0m\]" # Text Reset
# Regular Colors

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

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