[erlang-questions] Trying to learn the Erlang Way

kraythe . kraythe@REDACTED
Fri Feb 7 15:47:36 CET 2014


Man I feel silly. but then I am fighting a chest cold. I guess this happens
easier when you don't have completion or highlighting that I am used to in
an IDE.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Fri, Feb 7, 2014 at 1:27 AM, Vlad Dumitrescu <vladdu55@REDACTED> wrote:

> Hi,
>
> On Fri, Feb 7, 2014 at 8:25 AM, kraythe . <kraythe@REDACTED> wrote:
> > coordinateGreaterThan(V, {X, Y, Z}) when X > V; Y > V; Z > V -> true;
> > coordinateGreaterThan(_, _) -> false.
> >
> > %% Culls the list of vectors X to only those that are in the sphere
> devined
> > by vector C as a center and R as a radius.
> > cull(C, R, Vectors) when is_number(R), is_tuple(C) -> cull(C, R, Vectors,
> > []).
> > cull(C, R, Culled, []) -> Culled;
> > cull(C, R, Culled, [Head|Tail]) ->
> >   D = subtract(C, Head),
> >   case coordinateIsGreaterThan(R, Head) of
> >     true -> cull(C, R, Culled, Tail);
> >
> > 1) Why is it saying my coordinateIsGreaterThan/2 method is undefined
> when I
> > can see it here and then to say it is unused in the next line? That seems
> > contradictory?
>
> Look carefully and see that you define "coordinateGreaterThan" and
> call "coordinateIsGreaterThan".
>
> regards,
> Vlad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140207/868efbdc/attachment.htm>


More information about the erlang-questions mailing list