[erlang-questions] Proposal: add lists:intersperse/2 and lists:intercalate/2
Tue Mar 8 15:12:13 CET 2016
There's really no necessity to appeal to technical algebraic terminology
(at least in this case :)). In common, everyday usage, "join" means to
connect multiple components into one (usually using some sort of a
connector part), so, for strings - its common usage is just fine, while
for sequences/lists - the closest match seems to be fold/reduce and friends.
On 3/8/16 2:46 AM, Mike French wrote:
> For me, Clifford Algebras are all about the physics, not the math.
> Haskell : Erlang :: Clifford Algebra : Gibbs' vector notation
> So the usual Gibbs vector analysis stuff is a pile of loosely typed expressions that work most of the time if you are careful, but Clifford Algebra is a beautiful strongly typed hierarchy, which is usually correct by construction, but rarely used in the real world.
> I would honestly implore everyone to read some of David Hestenes's work on Geometric Algebra for the sheer aesthetic pleasure of seeing how something can be beautiful, powerful and true (in the physics sense of gaining useful insight) all at the same time.
> From: <> on behalf of Richard A. O'Keefe <>
> Sent: Tuesday, March 8, 2016 02:55
> To: Garrett Smith; Jesper Louis Andersen
> Cc: Erlang (E-mail)
> Subject: Re: [erlang-questions] Proposal: add lists:intersperse/2 and lists:intercalate/2
> On 8/03/16 4:53 am, Garrett Smith wrote:
>> For whatever reason FP pedantry is not a draw for me. When I need
>> inspiration I look to Python. Maybe that's the wrong direction and we
>> need to drive our community through more gates.
> I don't know what "drive our community through more gates" means,
> but copying Python is *definitely* the wrong direction. Heck, even
> *Python* (3) hasn't followed Python (2) When it comes to cultural
> compatibility with Erlang, Python is better than COBOL, PL/I, or RPG.
> But that's about as far as I'd go.
> For what it's worth, in Swift there is no 'join' function; instead there
> are JoinGenerator and JoinSequence *types*.
> Monads aren't pedantry: they're (an instance of) *power*. If you can
> view something as a Monad, then you get a range of useful operations
> for free. (And this applies to other things like Monoid as well.) It's
> not, I think, unfair to say that
> Haskell : Erlang :: Category Theory : Naive Set Theory.
> I'm a set theory person myself; I have been trying for years to get
> further than chapter 3 of any category theory textbook and failing.
> (Not unlike the way I get the generalisation of vector spaces to
> tensor algebras, but then Clifford algebras trigger math-acrophobia.)
> I am very happy with Haskell as a typed functional language, but the
> Haskell community does tend to push abstraction to levels where my
> ears bleed. But I understand why they are doing it, and it's not
> pedantry: it's the passionate pursuit of programming power from
> precise analogies. It's the entirely reasonable desire to take a
> piece of code that might have worked in Lisp or Erlang and say
> "WHY does it work? How can we KNOW before we call it that it's
> going to work?" It's the lazy programmer's wish to write something
> just once crossed with the software engineer's wish that it should be
> *safe* to do so.
More information about the erlang-questions