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
| open System | |
| (* Low-level F# implementation *) | |
| let newRandomChar getRandomInt (chars : char[]) = | |
| let idx = getRandomInt() | |
| chars.[idx] | |
| let newRandomWord (getRandomChar : unit -> char) length = | |
| let chars = | |
| Array.init length (fun _ -> getRandomChar()) |
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
| #r "FSharp.Data.TypeProviders" | |
| #r "System.Data.Services.Client" | |
| open Microsoft.FSharp.Data.TypeProviders | |
| [<Generate>] // Only needed for the Developer Preview (this will be dropped before the official release of F# 3.0) | |
| type stackoverflow = | |
| ODataService<ServiceUri = @"http://data.stackexchange.com/stackoverflow/atom"> | |
| let dataContext = stackoverflow.GetDataContext() | |
| query { |