This example demonstrates a counter application written directly in WebAssembly Text Format (WAT). The compiled Wasm module is only 389 bytes.
It can be a good way to learn and experiment with the IC System API.
icp network start -d
icp deploy
bash test.sh
icp network stopicp canister call --query counter get '()'
# (0 : int64)
icp canister call counter inc '()'
icp canister call --query counter get '()'
# (1 : int64)
icp canister call counter set '(42 : int64)'
icp canister call --query counter get '()'
# (42 : int64)