+--------------------+--------------------+-------------------------+--------------------+
|Operation | F#+ / F# |F#+ Haskell Compatibility|Haskell |
+====================+====================+=========================+====================+
|List.append | @ | | ++ |
+--------------------+--------------------+-------------------------+--------------------+
|Function composition| f << g | f . (g) | f . g |
+--------------------+--------------------+-------------------------+--------------------+
| | <| | $ | $ |
+--------------------+--------------------+-------------------------+--------------------+
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
# Generator for valid Swedish personnummer: http://en.wikipedia.org/wiki/Personal_identity_number_(Sweden) | |
# By Henrik Nyh <http://henrik.nyh.se> 2009-01-29 under the MIT license. | |
require 'date' | |
module Personnummer | |
def self.generate(date=nil, serial=nil) | |
date ||= Date.new(1900+rand(100), 1+rand(12), 1+rand(28)) | |
serial = serial ? serial.to_s : format("%03d", 1+rand(999)) # 001-999 |
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 identity.Controllers | |
open System | |
open System.Collections.Generic | |
open System.Linq | |
open System.Threading.Tasks | |
open Microsoft.AspNetCore.Mvc | |
[<Route("api/[controller]")>] | |
[<ApiController>] |
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 ProjectWithSwagger | |
{ | |
public class Startup | |
{ | |
// This method gets called by the runtime. Use this method to add services to the container | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
//.... | |
services.ConfigureSwaggerGen(swaggerGen => | |
{ |
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
open FSharpPlus | |
open FSharpPlus.Operators | |
module Collection= | |
let inline maximaBy (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>``= | |
let sorted = sortByDescending projection source | |
match tryHead sorted with | |
| None -> sorted | |
| Some max -> takeWhile ((compare <| projection max) >> (=) 0 << projection) sorted |
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
* FSharp.CodeFormat.Constants | |
Added: FSharp.CodeFormat.Constants (.NET type: Module and base: System.Object) | |
+ (Instance/Inheritance of FSharp.CodeFormat.Constants).Equals : | |
obj:System.Object | |
-> System.Boolean |
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
Building Solution: SynVer (Debug) | |
Build started 1/28/2018 5:03:07 PM. | |
__________________________________________________ | |
Project "/Users/mathieu/src/SyntacticVersioning/src/SynVer.Lib/SynVer.Lib.fsproj" (Build target(s)): | |
Target GenerateTargetFrameworkMonikerAttribute: | |
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. | |
Target CoreCompile: | |
/usr/local/share/dotnet/sdk/2.1.4/FSharp/RunFsc.sh -o:obj/Debug/netstandard2.0/SynVer.Lib.dll |
+--------------------+--------------------+-------------------------+--------------------+
|Operation | F#+ / F# |F#+ Haskell Compatibility|Haskell |
+====================+====================+=========================+====================+
|List.append | @ | | ++ |
+--------------------+--------------------+-------------------------+--------------------+
|Function composition| f << g | f . (g) | f . g |
+--------------------+--------------------+-------------------------+--------------------+
| | <| | $ | $ |
+--------------------+--------------------+-------------------------+--------------------+
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
<?xml version="1.0" encoding="UTF-8"?> | |
<states nation="United States of America" nation-abbreviation="USA" nation-capital="Washington, D.C."> | |
<state name="Alabama" abbreviation="AL" capital="Montgomery" date="1819-12-14" most-populous-city="Birmingham" population="4708708" square-miles="52423" time-zone-1="CST (UTC-06)" time-zone-2="EST (UTC-05)" dst="Yes"/> | |
<state name="Alaska" abbreviation="AK" capital="Juneau" date="1959-01-03" most-populous-city="Anchorage" population="698473" square-miles="656425" time-zone-1="AKST (UTC-09)" time-zone-2="HST (UTC-10)" dst="Yes"/> | |
<state name="Arizona" abbreviation="AZ" capital="Phoenix" date="1912-02-14" most-populous-city="Phoenix" population="6595778" square-miles="114006" time-zone-1="MT (UTC-07)" dst="No"/> | |
<state name="Arkansas" abbreviation="AR" capital="Little Rock" date="1836-06-15" most-populous-city="Little Rock" population="2889450" square-miles="53182" time-zone-1="CST (UTC-06)" dst="Yes"/> | |
<state name="California" abbreviation="CA" capital="Sacrame |
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 Tests | |
open System | |
open Xunit | |
open System | |
open ExtCore.Control.Cps | |
open ExtCore.Control.Collections.Cps | |
//https://github.com/fabriceleal/Continuations/blob/master/Continuations/Program.fs |