On Nov 21, 2016, at 9:37 AM, David Storrs wrote:
> In Perl I would often write:
>
> sub do_something {
> return unless ( some necessary condition is met );
> ... do the thing ...
> }
On Nov 21, 2016, at 10:07 AM, Leif Andersen wrote:
> Although honestly, with this pattern, I find t
Greetings.
On 21 Nov 2016, at 18:07, Leif Andersen wrote:
(define (do-something)
(unless (some-condition)
(error "NO"))
(do-the-thing))
(with-handlers ([exn:fail? (lambda (e) (displayln "I returned
early"))])
(do-something))
But that is specifically because I prefer the workflow
On Mon, Nov 21, 2016 at 10:30 AM, 'John Clements' via Racket Users <
racket-users@googlegroups.com> wrote:
>
> > On Nov 21, 2016, at 09:37, David Storrs wrote:
> >
> > In Perl I would often write:
> >
> > sub do_something {
> > return unless ( some necessary condition is met );
> > ... do
David, hello.
On 21 Nov 2016, at 17:37, David Storrs wrote:
In Perl I would often write:
sub do_something {
return unless ( some necessary condition is met );
... do the thing ...
}
One (not-really-an-)answer is that that's an intrinsically procedural
way of thinking about the func
> On Nov 21, 2016, at 09:37, David Storrs wrote:
>
> In Perl I would often write:
>
> sub do_something {
> return unless ( some necessary condition is met );
> ... do the thing ...
> }
>
> In Racket I could wrap the rest of the procedure in an (if), but that adds an
> unnecessary leve
In Perl I would often write:
sub do_something {
return unless ( some necessary condition is met );
... do the thing ...
}
In Racket I could wrap the rest of the procedure in an (if), but that adds
an unnecessary level of indentation and feels clunky. Is there a clean
solution?
--
You r
6 matches
Mail list logo