From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.36.51.141 with SMTP id k135mr3542770itk.19.1516033247696; Mon, 15 Jan 2018 08:20:47 -0800 (PST) X-Received: by 10.157.4.236 with SMTP id 99mr948202otm.10.1516033247464; Mon, 15 Jan 2018 08:20:47 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer03.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no1762428ita.0!news-out.google.com!b73ni15730ita.0!nntp.google.com!w142no1762422ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 15 Jan 2018 08:20:47 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.245.163.212; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.245.163.212 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: function as first class object From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Mon, 15 Jan 2018 16:20:47 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1464 X-Received-Body-CRC: 2462248110 Xref: reader02.eternal-september.org comp.lang.ada:49920 Date: 2018-01-15T08:20:47-08:00 List-Id: 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.