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 FSharpConsumer | |
let a = FSharpNamespace.Class2.Something; | |
// Notice that in F# we use "open" for both modules and namespaces. | |
// See the F# spec section 14.1.3 Opening Modules and Namespace Declaration Groups | |
// for precise details. | |
open FSharpNamespace | |
let b = Class2.Something; |
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 FSharpModule | |
let fn() = 1 | |
type Class1() = | |
member this.X = "F#" |
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
namespace FSharpNamespace | |
type Class2 = | |
| Something | |
| OtherThing of int |
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; | |
// 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 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 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" |
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
import scala.xml._ | |
object SampleWorksheet { | |
// Some simple xml | |
val xml = """ | |
<cone style="waffle" sprinkles="red"> | |
tasty!! | |
<scoop size="small" /> | |
<scoop size="large" /> | |
</cone> |
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.restphone | |
import scalaz._ | |
import Scalaz._ | |
import scala.concurrent.Future | |
import scala.concurrent.Future._ | |
import scala.concurrent.Await | |
import scala.concurrent.duration._ | |
object MonadEvidenceThatWillMakeSenseLater { |
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
type GetList() = | |
let switchvox_users_voicemail_getList_response = """ | |
</response>""" | |
le | |
let switchvox_users_voicemail_getList = """ | |
</request>""" | |
me | |
member self.X = switchvox_users_voicemail_getList_response |
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
type GetList() = | |
let switchvox_users_voicemail_getList_response = """ | |
</response>""" | |
let switchvox_users_voicemail_getList = """ | |
</request>""" | |
member self.X = switchvox_users_voicemail_getList_response |