comp.lang.ada
 help / color / mirror / Atom feed
From: Mehdi Saada <00120260a@gmail.com>
Subject: function as first class object
Date: Mon, 15 Jan 2018 08:20:47 -0800 (PST)
Date: 2018-01-15T08:20:47-08:00	[thread overview]
Message-ID: <dbd6d6ee-10b7-4cef-b7a6-e75205b9965e@googlegroups.com> (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.


             reply	other threads:[~2018-01-15 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 16:20 Mehdi Saada [this message]
2018-01-15 17:37 ` function as first class object Dmitry A. Kazakov
2018-01-15 17:46   ` Mehdi Saada
2018-01-15 17:50     ` Dmitry A. Kazakov
replies disabled

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