Rholang
1 program
Added 2025-10-22T15:26:46Z
Model: anthropic/claude-3.5-sonnetTemp: 0.4
Evidence
Report issue
View issues
Aliases: rho-calculus
Provenance: commit 7cf29894a8 · authored 2025-10-22T17:26:47+02:00 · model anthropic/claude-3.5-sonnet
Sources mentioning this language
2 sources · pl_id:
pl/rholangRelated languages
LLM-contributed programs
Simple Counter Contract
Provenance: commit 7cf29894a8 · authored 2025-10-22T17:26:47+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
contract @"BasicWallet"(@init, return) = {
new balanceStore in {
match init {
Int => {
@"stdout"!("Initial balance is ${init}")
|
balanceStore!(init)
|
contract @[*return, "deposit"](@amount, depositReturnCh) = {
new resultCh in {
for (@balance <- balanceStore) {
match amount {
Int => {
balanceStore!(balance + amount)
|
depositReturnCh!(true)
}
_ => {
balanceStore!(balance)
|
depositReturnCh!(false)
}
}
}
}
}
}
}
}
}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)