[Suave.Testing][st] for net461:
- [FSharp.Core][fs] >= 4.0.0.1
Suave.Testing for netstandard2.0:
- FSharp.Core >= 4.2.3
function unfoldWith(fn) { | |
return value => { | |
let a = [], | |
{ next, element, done } = fn(value); | |
while (!done) { | |
a.push(element); | |
({ next, element, done } = fn(next)); | |
} | |
return a; | |
} |
What should F# as a language contain?
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Say something</title> | |
</head> | |
<body> | |
<form action="/" method="POST"> | |
<fieldset for="to-say"> | |
To say: |
Comments on https://github.com/fsharp/fslang-design/blob/master/RFCs/FS-1034-fsharp-core-package.md#today
So sign it?
module LoggerExtensions | |
open Hopac | |
/// Extensions to the Expecto logger for Hopac. | |
type Expecto.Logging.Logger with | |
/// Log Verbose with backpressure as a job | |
member x.verboseWithBPJ factory = | |
x.verboseWithBP factory |> Job.fromAsync | |
/// Log Debug with backpressure as a job |
type DU = | |
| ACaseName | |
| BThereCake | |
let magic (q: Quotation<_>): string = | |
// smallest F# code in here? | |
open Expecto | |
let subject = magic <@ ACaseName @> | |
Expect.equal subject "ACaseName" "Should extract the NAME of the DU case" |
open Hopac | |
open Hopac.Infixes | |
/// A thread safe dictionary supports multiple-readers', multiple-writers' | |
/// access to a normal .Net dictionary. | |
type ThreadSafeDictionary<'K, 'V> = | |
private { | |
tryAddCh: Ch<'K * (unit -> 'V) * Ch<'V> * Promise<unit>> | |
tryAddSelectCh: Ch<'K * (unit -> 'V) * ('V -> obj) * Ch<obj> * Promise<unit>> | |
tryRemoveCh: Ch<'K * Ch<'V option> * Promise<unit>> |
let startPublicWebApi s (logary : LogManager) esConn : Job<IAsyncDisposable> = | |
let webApi = createPublicWebApi s esConn | |
let cts = new CancellationTokenSource() | |
let webConfig = | |
{ defaultConfig with | |
cancellationToken = cts.Token | |
bindings = [ HttpBinding.createSimple HTTP "0.0.0.0" s.listenPort ] | |
} | |
LogaryFacadeAdapter.initialise<Suave.Logging.Logger> logary |
module PDFSharp.OSX | |
open PdfSharp | |
open PdfSharp.Fonts | |
open PdfSharp.Pdf | |
open PdfSharp.Drawing | |
open System | |
open System.Drawing | |
open System.Drawing.Text | |
open System.Globalization |