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
package com.tomaszpolanski.androidsandbox.utils.option; | |
import com.android.internal.util.Predicate; | |
import rx.functions.Action0; | |
import rx.functions.Action1; | |
import rx.functions.Func0; | |
import rx.functions.Func1; | |
public final class None<A> extends Option<A> { |
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
package com.tomaszpolanski.androidsandbox.models; | |
import com.tomaszpolanski.androidsandbox.utils.option.Option; | |
public class Person { | |
public final String Name; | |
private Person(String name) { | |
Name = name; |
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
package com.tomaszpolanski.androidsandbox.models; | |
import com.tomaszpolanski.androidsandbox.utils.MathUtils; | |
import com.tomaszpolanski.androidsandbox.utils.option.Option; | |
import com.tomaszpolanski.androidsandbox.utils.result.Result; | |
import com.tomaszpolanski.androidsandbox.utils.result.ResultTuple; | |
import java.text.DecimalFormat; | |
import java.text.NumberFormat; |
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
module Basics = | |
let xValue = 2 | |
let yValue = xValue + 3 | |
let add x y = x + y | |
let additionResult = add 2 3 | |
let addTwo arg = add arg 2 | |
addTwo 10 | |
let getTwo() = 2 |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Common | |
{ | |
public abstract class Option<T> | |
{ | |
public static readonly None<T> None = new None<T>(); |
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
public final class DataStreamNotification<T> { | |
private enum Type { | |
FETCHING_START, | |
FETCHING_COMPLETED, | |
FETCHING_ERROR, | |
ON_NEXT | |
} | |
@NonNull |
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
// Tool to nicely validate your regex: http://www.regexpal.com/ | |
// Empty java regex | |
//g | |
// Single letter | |
/T/g | |
// Testing | |
/T/g.test('T') |
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
# Other presentation file |
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
ββββββββββββ¦ββββββββββββββββββ¦ββββββββββββββββ¦ββββββββββββββββ | |
β Function β Receiver (this) β Argument (it) β Result β | |
β βββββββββββ¬ββββββββββββββββββ¬ββββββββββββββββ¬ββββββββββββββββ£ | |
β let β this@MyClass β String("...") β Int(42) β | |
β run β String("...") β N\A β Int(42) β | |
β run* β this@MyClass β N\A β Int(42) β | |
β with* β String("...") β N\A β Int(42) β | |
β apply β String("...") β N\A β String("...") β | |
β also β this@MyClass β String("...") β String("...") β | |
ββββββββββββ©ββββββββββββββββββ©ββββββββββββββββ©ββββββββββββββββ |
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
ββββββββββββ¦ββββββββββββββββββ¦ββββββββββββββββ¦ββββββββββββββββ | |
β Function β Receiver (this) β Argument (it) β Result β | |
β βββββββββββ¬ββββββββββββββββββ¬ββββββββββββββββ¬ββββββββββββββββ£ | |
β let β this@MyClass β String("...") β Int(42) β | |
ββββββββββββ©ββββββββββββββββββ©ββββββββββββββββ©ββββββββββββββββ |
OlderNewer