This file contains hidden or 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 FSharpModule | |
let fn() = 1 | |
type Class1() = | |
member this.X = "F#" |
This file contains hidden or 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
namespace FSharpNamespace | |
type Class2 = | |
| Something | |
| OtherThing of int |
This file contains hidden or 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; | |
// Note that "using FSharpModule" (without "static") isn't legal C#. | |
// An FSharp module gets compiled into a type, and "using" specifically | |
// imports namespaces. | |
using static FSharpModule; | |
using FSharpNamespace; | |
using static FSharpNamespace.Class2; | |
#pragma warning disable 219 // no warnings about unused variables |
This file contains hidden or 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
scala> import shapeless._ | |
import shapeless._ | |
scala> import shapeless.ops.function.FnToProduct | |
import shapeless.ops.function.FnToProduct | |
scala> | |
scala> // a normal function taking a string and returning 42 |
This file contains hidden or 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
Script started on Sat Sep 20 11:40:10 2014 | |
[0m[[0minfo[0m] [0mLoading global plugins from /Users/james/.sbt/0.13/plugins[0m | |
[0m[[0minfo[0m] [0mLoading project definition from /Users/james/workspace/jstwodelete/project[0m | |
[0m[[0minfo[0m] [0mUpdating {file:/Users/james/workspace/jstwodelete/project/}jstwodelete-build...[0m | |
[0m[[0minfo[0m] [0mResolving default#global-plugins;0.0 ...[0m | |
M[2K[0m[[0minfo[0m] [0mResolving com.typesafe.sbteclipse#sbteclipse-plugin;2.4.0 ...[0m | |
M[2K[0m[[0minfo[0m] [0mResolving com.typesafe.sbteclipse#sbteclipse-core;2.4.0 ...[0m |
This file contains hidden or 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.restphone.scalaztalk | |
import scalaz._ | |
import Scalaz._ | |
object Samples { | |
val wrapWithParens = (x: String) => s"( $x )" //> wrapWithParens : String => String = <function1> | |
val wrapWithSquareBrackets = (x: Int) => s"[ $x ]" | |
//> wrapWithSquareBrackets : Int => String = <function1> | |
val wrapWithBoth: Int => String = wrapWithParens compose wrapWithSquareBrackets |
This file contains hidden or 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
object TopicPlayground extends App { | |
val t: Topic[String] = scalaz.stream.async.topic() | |
val sub1 = t.subscribe | |
val out1 = sub1 | |
.flatMap(x => Process.tell(s"raw value: $x") ++ Process.emitO(x.length)) | |
.runLog | |
val otherThread = future { |
This file contains hidden or 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
object TopicPlayground extends App { | |
val t: Topic[String] = scalaz.stream.async.topic() | |
val sub1 = t.subscribe | |
val out1 = sub1 | |
.flatMap(x => Process.tell(s"raw value: $x") ++ Process.emitO(x.length)) |
This file contains hidden or 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
--------- beginning of /dev/log/main | |
W/Binder (18423): Caught a RuntimeException from the binder stub implementation. | |
W/Binder (18423): java.lang.NullPointerException | |
W/Binder (18423): at android.inputmethodservice.IInputMethodWrapper.setSessionEnabled(IInputMethodWrapper.java:280) | |
W/Binder (18423): at com.android.internal.view.IInputMethod$Stub.onTransact(IInputMethod.java:129) | |
W/Binder (18423): at android.os.Binder.execTransact(Binder.java:404) | |
W/Binder (18423): at dalvik.system.NativeStart.run(Native Method) | |
--------- beginning of /dev/log/system | |
W/InputMethodManagerService( 446): Got RemoteException sending setActive(false) notification to pid 9109 uid 10165 | |
I/ActivityManager( 446): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.amazon.kindle cmp=com.amazon.kindle/.UpgradePage bnds=[454,215][646,407]} from pid 31860 |
This file contains hidden or 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
[merge] | |
summary = true | |
tool = "p4" | |
[mergetool "p4"] | |
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge \ | |
"$PWD/$BASE" \ | |
"$PWD/$LOCAL" \ | |
"$PWD/$REMOTE" \ | |
"$PWD/$MERGED" |