00:00:13 Hmm, yeah I realized that issue
00:00:50 They will return true when the first or rest part of a pair is #t respectively
00:01:20 So, they are unsuitable for tests here
00:01:44 I see
00:02:48 so how can I access the elements of the list?
00:05:00 with first and rest, but why are you using the elements as a test?
00:05:45 should I remove elements from the list and increment until the list is empty?
00:06:20 -!- christopher [~christoph@c-98-201-58-105.hsd1.tx.comcast.net] has quit [Ping timeout: 255 seconds]
00:06:59 In essence, yes
00:07:18 Let's go back to your help-length function for a moment
00:07:30 What should (help-length 0 '()) return?
00:08:29 ijp: It was going to return the value of the counter
00:08:45 right, and the value of the counter in this instance is?
00:09:14 Well, I now have ((empty? L) S) as a condition
00:09:25 but I need to figure out how to remove elements from a list
00:12:55 right, and you get the rest of the list with REST
00:13:32 so, if we have (help-length S '(1)), what do we want the value of S to be in the next call to help-length?
00:14:05 1?
00:14:42 Not quite,
00:15:47 What happened to the existing value of S?
00:17:52 Better question, what is the function of S to begin with?
00:18:31 it increments every iteration in the list
00:18:39 *ijp* is not cut out for this "teaching by asking questions" lark
00:18:44 haha
00:18:59 -!- tronador_ [~guille@190.66.173.210] has quit [Quit: tronador_]
00:19:25 lingrush: right, but if you just give it a number 1, then will it ever get any bigger?
00:19:52 well no, but every iteration i have it (+ S 1)
00:20:40 lingrush: I do not see an update in the recursive call, do you? ;)
00:21:40 wait wait hold on
00:21:48 so now I have ((empty? L) S)
00:21:48 (else (help-length (+ S 1) (rest L)))
00:21:50 but
00:22:05 but?
00:22:24 I don't know how I would address the first element
00:22:45 and why do you need to address the first element?
00:24:18 oh
00:24:21 I guess I don't
00:24:25 Hey it works!
00:25:27 thanks!
00:26:14 you're welcome
00:26:41 :D
00:33:15 tronador_ [~guille@190.66.173.210] has joined #scheme
00:44:07 -!- ysph [~user@adsl-89-38-168.mgm.bellsouth.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
00:47:22 -!- bgs100 [~ian@unaffiliated/bgs100] has quit [Quit: Leaving]
00:47:32 nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #scheme
00:47:57 tauntaun [~icarus@64.134.66.112] has joined #scheme
00:52:03 -!- lingrush [~klol@99-150-247-108.lightspeed.sndgca.sbcglobal.net] has quit [Remote host closed the connection]
01:01:42 lingrush [~klol@99-150-247-108.lightspeed.sndgca.sbcglobal.net] has joined #scheme
01:02:19 So, I have (define return-element-list (lambda (S E L) (cond ((equal? S E) (rest L)) (else (return-element-list (+ S 1) E (rest L))))))
01:02:44 and it works if S >0, but it returns "empty" if S is 0
01:05:08 Does anyone know what that happens?
01:05:14 why*
01:06:47 I don't know what REST is, but presumably that depends on what you pass for E and L.
01:06:59 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.]
01:07:07 rest is cdr
01:07:32