##F# Programming Language## Learning Resources :
Video Channels :
| #===================== | |
| # Unity Project Files | |
| #===================== | |
| /[Ll]ibrary/ | |
| /[Tt]emp/ | |
| /[Oo]bj/ | |
| /[Bb]uild/ | |
| *.userprefs |
| # If this script is throwing an error near a Unicode symbol try resaving the file as UTF-8 with BOM | |
| $psmodules = ";~\Documents\WindowsPowerShell\Modules" | |
| # sometimes the module paths has been fucked before posh loads, but that won't stop us | |
| $env:PSModulePath = $env:PSModulePath + $psmodules | |
| # Set the OutputEncoding to Unicode so that the λ renders properly | |
| [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 | |
| module Morphisms = | |
| /// Hylomorphism that composes an unfold into a fold | |
| /// folding an unfold | |
| // ( fold o unfold )(x) = fold (unfold(x)) | |
| let hylomorphism | |
| (ufstepfn:#seq<'b>->'b->#seq<'b>)(ufacc:#seq<'b>)(pred:'a->bool)(mapElm:'a->'b) (inc:'a->'a) | |
| (fstepfn:'c->'b->'c) (foldAcc :'c) : 'a -> 'c = | |
| (Folds.unfold ufstepfn ufacc pred mapElm inc ) >> (Folds.foldl fstepfn foldAcc ) |
| namespace ViewModels | |
| open System.Windows | |
| open System.Windows.Controls | |
| open System.Windows.Documents | |
| open System.Windows.Media | |
| open GUIControls.Extensions | |
| open GUIControls.Patterns | |
| open System.Windows.Interactivity |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using UnityEngine; | |
| using UnityEditor; | |
| using HexMap; | |
| using ExtensionMethods; | |
| [<Struct>] | |
| type Lens<'Struct,'Prop> = | |
| val Get : 'Struct -> 'Prop | |
| val Set : 'Prop -> 'Struct -> 'Struct | |
| member lens.Update func prop = | |
| let value = lens.Get prop | |
| let result = func value | |
| lens.Set result prop |
| (*=============================== | |
| || || | |
| || QuickStart || | |
| || || | |
| ===============================*) | |
| // A simple example of a property definition is | |
| let prop_RevRev xs = List.rev(List.rev xs) = xs |
| :: ================================================================================================= | |
| :: Copyright 2013 Adobe Systems Incorporated | |
| :: All Rights Reserved. | |
| :: | |
| :: NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms | |
| :: of the Adobe license agreement accompanying it. | |
| :: ================================================================================================= | |
| echo OFF | |
| cls |
| :: ================================================================================================= | |
| :: Copyright 2013 Adobe Systems Incorporated | |
| :: All Rights Reserved. | |
| :: | |
| :: NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms | |
| :: of the Adobe license agreement accompanying it. | |
| :: ================================================================================================= | |
| REM Available Arguments: | |
| REM [64|32] Bit Architecture (optional, 64 is default) |