mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-31 17:17:26 +00:00

* Snake-case-ify def names in comments * Snake-case-ify def names in strings * Snake-case-ify ignored function parameters * Snake-case-ify test script names, for consistency * Update CI snapshot to match snake_case * snake case correction --------- Co-authored-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
37 lines
667 B
Text
37 lines
667 B
Text
app [main!] { pf: platform "platform/main.roc" }
|
|
|
|
import pf.Host
|
|
import AStar
|
|
|
|
main! = \{} ->
|
|
Host.put_line!(show_bool(test1))
|
|
|
|
show_bool : Bool -> Str
|
|
show_bool = \b ->
|
|
if
|
|
b
|
|
then
|
|
"True"
|
|
else
|
|
"False"
|
|
|
|
test1 : Bool
|
|
test1 =
|
|
example1 == [2, 4]
|
|
|
|
example1 : List I64
|
|
example1 =
|
|
step : I64 -> Set I64
|
|
step = \n ->
|
|
when n is
|
|
1 -> Set.from_list([2, 3])
|
|
2 -> Set.from_list([4])
|
|
3 -> Set.from_list([4])
|
|
_ -> Set.from_list([])
|
|
|
|
cost : I64, I64 -> F64
|
|
cost = \_, _ -> 1
|
|
|
|
when AStar.find_path(cost, step, 1, 4) is
|
|
Ok(path) -> path
|
|
Err(_) -> []
|