Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80787

Re: Array of Functions

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: Array of Functions
Date Sat, 15 Nov 2014 00:21:13 +0200
Organization A noiseless patient Spider
Lines 21
Message-ID <871tp5mnja.fsf@elektro.pacujo.net> (permalink)
References <42b534f0-aeef-411f-80c5-db5d20c80b55@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain
Injection-Info mx02.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="16371"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/OAYmvhp6WRb/DHiFf9PH"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:XARvVSw/cVzommdWHQaClSvonHk= sha1:b+63NNWPqgarnORUie0FHNiaciw=
Xref csiph.com comp.lang.python:80787

Show key headers only | View raw


Richard Riehle <rriehle@itu.edu>:

> Example:
>
>             r1c1   r1c2  r1c3
>             r2c1   r2c2  r2c3
>             r3c1   r3c2  r3c3
>
> where r1 is row 1 and c1 is column 1. Suppose I want an array where the
> colum three is a set of functions that operates on the other two
> columns, depending on the values I set for those rows and columns? As
> noted, I can do this pretty easily in most languages (well, except for
> Java which does not support any kind of functional programming
> capability), even if I have to use pointers.

Show some code in, say, Scheme (which is among the most functional
programming languages in existence), and we'll see how we could
translate that into Python.


Marko

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Array of Functions Richard Riehle <rriehle@itu.edu> - 2014-11-14 14:17 -0800
  Re: Array of Functions Marko Rauhamaa <marko@pacujo.net> - 2014-11-15 00:21 +0200
  Re: Array of Functions Sam Raker <sam.raker@gmail.com> - 2014-11-14 14:44 -0800
  Re: Array of Functions Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-14 15:50 -0700
  Re: Array of Functions MRAB <python@mrabarnett.plus.com> - 2014-11-14 23:02 +0000
  Re: Array of Functions Terry Reedy <tjreedy@udel.edu> - 2014-11-14 19:11 -0500
  Re: Array of Functions Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-11-14 19:13 -0500
    Re: Array of Functions Richard Riehle <rriehle@itu.edu> - 2014-11-16 23:52 -0800
  Re: Array of Functions Anton <anschatten@gmail.com> - 2014-11-17 13:56 -0800

csiph-web