[obsidian] vault backup: 2024-10-30 16:07:08[
This commit is contained in:
		
							
								
								
									
										27
									
								
								content/mimiumでMIDIインプットを実装.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								content/mimiumでMIDIインプットを実装.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
---
 | 
			
		||||
date: 2024-10-30 15:42
 | 
			
		||||
---
 | 
			
		||||
#mimium
 | 
			
		||||
 | 
			
		||||
IOの順序保証とか考える
 | 
			
		||||
 | 
			
		||||
正格評価だとIOモナドとかはそもそも考える必要がない
 | 
			
		||||
 | 
			
		||||
[Algebraic Effects入門](https://v2.aintek.xyz/posts/introduction-to-algebraic-effects)
 | 
			
		||||
 | 
			
		||||
> `type 'a io = unit -> 'a`
 | 
			
		||||
> 純粋な値は以下のようなIOモナドにリフトできる。
 | 
			
		||||
> `let return x = fun () -> x`
 | 
			
		||||
> 計算はバインド演算子によってつなげることができる。
 | 
			
		||||
> `let (>>=) c1 c2 = fun () -> c2 (c1 ())`
 | 
			
		||||
 | 
			
		||||
mimiumだとバインド演算子ってこうか(ジェネリクスが必要だけども)
 | 
			
		||||
 | 
			
		||||
```rust
 | 
			
		||||
fn bind(f1,f2){
 | 
			
		||||
 | | f1() |> f2
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 Submodule content/private updated: 1f600c949a...290bc582d6
									
								
							
		Reference in New Issue
	
	Block a user