(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| const partition = (list, partitioner) => { | |
| const toIndex = (el) => (partitioner(el)) ? 0 : 1; | |
| const toPartition = (result, el) => { | |
| result[toIndex(el)].push(el) | |
| return result; | |
| } | |
| return list.reduce(toPartition, [[],[]]); | |
| } |
| #!/bin/bash | |
| minikube start --memory $(expr 32 \* 1024) --cpus 8 |
| /* | |
| !/some-folder |
| sqlite3 file.db | |
| .TABLES |
| { | |
| "data": { | |
| "datasets": [ | |
| { | |
| "backgroundColor": [ | |
| "rgb(255, 99, 132)", | |
| "rgb(54, 162, 235)", | |
| "rgb(255, 205, 86)" | |
| ], | |
| "data": [ |
| -- Get the PubKeyHash type | |
| import Control.Monad (void) | |
| import Ledger | |
| import Data.Aeson (FromJSON, ToJSON) | |
| import qualified Language.PlutusTx as PlutusTx | |
| import qualified Ledger.Ada as Ada | |
| import qualified Ledger.Typed.Scripts as Scripts | |
| import Wallet.Emulator.Wallet | |
| import Playground.Contract | |
| import qualified Data.Text as T |
| -- A game with two players. Player 1 thinks of a secret word | |
| -- and uses its hash, and the game validator script, to lock | |
| -- some funds (the prize) in a pay-to-script transaction output. | |
| -- Player 2 guesses the word by attempting to spend the transaction | |
| -- output. If the guess is correct, the validator script releases the funds. | |
| -- If it isn't, the funds stay locked. | |
| import Control.Monad (void) | |
| import qualified Data.ByteString.Char8 as C | |
| import Language.Plutus.Contract | |
| import qualified Language.PlutusTx as PlutusTx |
| #!/bin/bash | |
| function cardano-address-init() { | |
| WALLETS_DIR=${HOME}/.cardano/wallets | |
| MNEMONICS_SIZE=24 | |
| } | |
| function cardano-address-testnet-init() { |