When testing my solution, the tester for this exercise emits the following message:
Error: Module `diamond.ua` is experimental. To use it, add `# Experimental!` to the top of this file.
at /mnt/exercism-iteration/tests.ua:1:3
1 | ~ "diamond.ua" ~ Diamond
I suppose diamond.ua uses an unstable function and therefore requires the “Experimental!” flag.
To replicate, here’s my attempt:
# Experimental!
# Output the diamond shape for a given letter
Index ← +1⨂"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Quad ← ⍜⊜∘≡⋅@ ⊸⦷ "@" ⍜(+1)(+@A×)⟜⊞=⊃(⇡|⇡)
Draw ← ⊙◌˜⊂⇌⊸↘¯1≡⊂⊸(⧋⇌⧋↘1)⟜(⇌↘¯1)
# Rows ? Letter
Diamond ← |1 Draw Quad Index
(I had to mark it as Experimental because I use evert, which was only stabilised in v0.18).
Does anybody have a working solution that tests fine?
Cheers.
Edit: no, that doesn’t make sense. It’ll be because I marked it Experimental, which presumably requires the module to be marked as Experimental when imported into tests.ua.
Solutions are (a) I rewrite my attempt (which passes tests, yay) to not use Experimental functions, or (b) somebody updates to v0.18 which stabilised the evert function I use.