I hereby claim:
- I am shinkwhek on github.
- I am shinkwhek (https://keybase.io/shinkwhek) on keybase.
- I have a public key ASCYt6jZAYcLukjAJ7pzOFDbEMqp4q0D6zieFooIYFrfGAo
To claim this, I am signing this object:
// https://github.com/oreilly-japan/conc_ytakano/tree/main/chap3/3.9 | |
use std::ptr::{read_volatile, write_volatile}; | |
use std::sync::atomic::{fence, Ordering}; | |
use std::thread; | |
const NUM_THREADS: usize = 4; | |
const NUM_LOOP: usize = 100000; | |
macro_rules! read_mem { |
I hereby claim:
To claim this, I am signing this object:
-- Input a user name and password. Make sure the password matches. | |
-- | |
-- Read how it works: | |
-- https://guide.elm-lang.org/architecture/forms.html | |
-- | |
import Browser | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onInput, onClick) |
open FSharpPlus | |
type NewList<'a> = | |
| Nil | |
| Cons of 'a * NewList<'a> | |
type Monadic<'a, 'b> = | |
| Monadic of ('a -> ('b * 'a)) | |
static member Return x = Monadic(fun c -> (x, c)) | |
static member (>>=) (Monadic f, g) = |
-- Input a user name and password. Make sure the password matches. | |
-- | |
-- Read how it works: | |
-- https://guide.elm-lang.org/architecture/forms.html | |
-- | |
import Browser | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onInput, onClick) |
trait Monad<A, MA> { | |
fn _return(a: A) -> MA; | |
fn _bind<F>(self, f: F) -> MA | |
where | |
F: Fn(A) -> MA; | |
} | |
#[derive(Debug, PartialEq)] | |
enum Maybe<T> { | |
Just(T), |