Conjugate a Latin verb: Difference between revisions

Realize in F#
(Added Perll)
(Realize in F#)
Line 66:
</pre>
 
=={{header|F_Sharp|F#}}==
===The function===
<lang fsharp>
// Conjugate a Latin Verb. Nigel Galloway: September 17th., 2021
let myLatin (n:string)=printfn "Rogatus sum iungere verbum %s" n
match n.Length>3,n.[-3..]="are" with
(false,_)|(_,false)->printfn "facis quod"
|_->["o";"as";"at";"amus";"atis";"ant"]|>List.iter(fun g->printfn "%s%s" n.[0.. -4] g)
myLatin "amare"
myLatin "executio"
</lang>
{{out}}
<pre>
Rogatus sum iungere verbum amare
amo
amas
amat
amamus
amatis
amant
Rogatus sum iungere verbum executio
facis quod
</pre>
=={{header|Factor}}==
{{works with|Factor|0.99 2021-06-02}}
2,171

edits