- Install Haskell Platform
- Install Visual Studo Code
- Install VS Code Plugin Haskell Syntax Highlighting
object SameGame { | |
final case class Position(col: Int, row: Int) | |
sealed trait Color | |
case object Green extends Color | |
case object Blue extends Color | |
case object Red extends Color | |
case object Brown extends Color | |
case object Gray extends Color |
#load @"paket-files/fsprojects/Chessie/src/Chessie/ErrorHandling.fs" | |
type Continuation<'output, 'next> = 'output -> 'next | |
module TerminalDsl = | |
open Chessie.ErrorHandling | |
type Terminal<'next> = | |
| WriteLine of string * Continuation<unit, 'next> | |
| ReadLine of unit * Continuation<string, 'next> |
[<AutoOpen>] | |
module IO = | |
type IO<'a> = | |
private | |
| Return of (unit -> 'a) | |
| Suspend of (unit -> IO<'a>) | |
let rec run x = | |
match x with | |
| Return v -> v() |
module Main exposing (main) | |
import Bootstrap.CDN as CDN | |
import Bootstrap.Card as Card | |
import Bootstrap.Card.Block as Block | |
import Bootstrap.Form as Form | |
import Bootstrap.Form.Input as Input | |
import Bootstrap.Grid as Grid | |
import Bootstrap.Utilities.Spacing as Spacing | |
import Browser |
import WebMidi from 'webmidi' | |
var btn1 = document.createElement('BUTTON') | |
btn1.innerHTML = 'send to all channels' | |
btn1.onclick = function () { play(song, 'all') } | |
document.body.appendChild(btn1) | |
var btn2 = document.createElement('BUTTON') | |
btn2.innerHTML = 'only one channel' | |
btn2.onclick = function () { play(song, 1) } |
public class Optimalstrategie : IStrategie | |
{ | |
private List<Schnitt> _ausgangsgroessen; | |
private Schnittverteilung _best; | |
private ILaufzeitMonitor _monitor; | |
public Optimalstrategie(ILaufzeitMonitor monitor) | |
{ | |
_monitor = monitor; | |
_best = null; |
import $ivy.`com.github.battermann::pureapp:0.6.0` | |
import com.github.battermann.pureapp._ | |
import com.github.battermann.pureapp.interpreters.Terminal._ | |
import cats.effect.IO | |
import cats.implicits._ | |
import scala.util.Try | |
object Main extends StandardPureApp[IO] { |
// The NUnit and Chessie Nuget packages are required for this | |
// To install NUnit and Chessie run the following commands from the Package Manager Console | |
// PM> Install-Package NUnit -Version 2.6.4 | |
// PM> Install-Package Chessie | |
using System; | |
using System.Text.RegularExpressions; | |
using Chessie.ErrorHandling; | |
using Chessie.ErrorHandling.CSharp; | |
using Microsoft.FSharp.Core; |
using System.Windows; | |
namespace PropertyToobsevable | |
{ | |
public partial class App : Application | |
{ | |
private void Application_Startup(object sender, StartupEventArgs e) | |
{ | |
var vm = new MainWindowViewModel(); | |
var mainWindow = new MainWindow { DataContext = vm }; |