Conjugate a Latin verb: Difference between revisions
m
julia example
(→{{header|Factor}}: show English meanings as well) |
m (julia example) |
||
Line 129:
dant they give
</pre>
=={{header|Julia}}==
<lang julia>const conjugators = ["ō", "ās", "at", "āmus", "ātis", "ant"]
conjugate(w, gregex = r"[aā]re$") = (r = replace(w, gregex => ""); [r * s for s in conjugators])
function testregularconjugation(verbvector)
for verb in verbvector
println("\nPresent active indicative conjugation of $verb:")
for result in conjugate(verb)
println(result)
end
end
end
testregularconjugation(["amāre", "dāre"])
</lang>{{out}}
<pre>
Present active indicative conjugation of amāre:
amō
amās
amat
amāmus
amātis
amant
Present active indicative conjugation of dāre:
dō
dās
dat
dāmus
dātis
dant
</pre>
=={{header|REXX}}==
|