comp.lang.ada
 help / color / mirror / Atom feed
* function as first class object
@ 2018-01-15 16:20 Mehdi Saada
  2018-01-15 17:37 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 4+ messages in thread
From: Mehdi Saada @ 2018-01-15 16:20 UTC (permalink / raw)


I'm thinking only of a limited form.
Like writing:
type FILTER_TYPE is access function (S: in STRING) return STRING;
FILTER: FILTER_TYPE := ( TO_BASIC( TO_LOWER ) )'Access
Not sure of the syntax though. Could it done one way or another ? Since the language is taking a slightly functional approach.
I know my exemple can be done otherwise, but it means more lines to maintain, blablabla. Or maybe convoluted use of nesting functions into functions, are in fact so rare it's not worth it.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-15 17:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-15 16:20 function as first class object Mehdi Saada
2018-01-15 17:37 ` Dmitry A. Kazakov
2018-01-15 17:46   ` Mehdi Saada
2018-01-15 17:50     ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox