Same fringe: Difference between revisions

m
m (syntax highlighting fixup automation)
m (→‎{{header|Wren}}: Minor tidy)
 
(One intermediate revision by one other user not shown)
Line 1,986:
"done"
</pre>
 
=={{header|Phixmonti}}==
<syntaxhighlight lang="Phixmonti">include ..\Utilitys.pmt
 
(
/# 1..3 are same #/
( "d" ( "c" ( "a" "b" ) ) )
( ( "d" "c" ) ( "a" "b" ) )
( ( ( "d" "c" ) "a" ) "b" )
/# and this one"s different! #/
( ( ( ( ( ( "a" ) "b" ) "c" ) "d" ) "e" ) "f" )
)
 
dup
 
len for >ps
tps get flatten ps> set
endfor
 
len 1 - for >ps
tps get swap tps 1 + get rot ==
( "Tree " tps " and " ps> 1 + " is " ) lprint
if "the same." else "different." endif ?
endfor</syntaxhighlight>
{{out}}
<pre>Tree 1 and 2 is the same.
Tree 2 and 3 is the same.
Tree 3 and 4 is different.
 
=== Press any key to exit ===</pre>
 
=={{header|PicoLisp}}==
Line 2,836 ⟶ 2,866:
{{trans|Go}}
{{libheader|Wren-dynamic}}
<syntaxhighlight lang="ecmascriptwren">import "./dynamic" for Struct
 
var Node = Struct.create("Node", ["key", "left", "right"])
9,485

edits