This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum APIEnvironment: String, CaseIterable { | |
case dev | |
case test | |
case stage | |
case prod | |
} | |
struct ContentView: View { | |
@State private var selection: APIEnvironment? = env | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type optionBuilder() = | |
member __.Bind(opt, f) = Option.bind f opt | |
member __.Bind(obj, f) = Option.bind f (Option.ofObj obj) | |
member __.Bind(obj, f) = Option.bind f (Option.ofObj (box obj)) | |
member __.Bind(obj, f) = Option.bind f (Option.ofNullable obj) | |
member __.Return x = Some x | |
member __.ReturnFrom x = x | |
let option = optionBuilder() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <eosiolib/eosio.hpp> | |
#include <eosiolib/print.hpp> | |
using namespace eosio; | |
struct hello : public contract { | |
using contract::contract; | |
void hi( name user ) { | |
print( “Hello, “, user ); | |
} |