我在做单人游戏的作弊游戏。我喜欢函数组合、不变性和没有样板的代码,这就是为什么我决定用F#编写代码的原因。我完成了一些工作正常的东西。我知道代码并不完美,但今天我开始了我的F#之旅。
我想知道是否有一种方法可以从我的代码中消除副作用。你能给我一些提示如何实现这一点吗?
谢谢,
Rafal
open System;
open System.Diagnostics;
open System.Runtime.InteropServices;
open System.Text;
open System.ComponentModel;
let flip f x y = f y x
let curry