Jump to content

Talk:Forward difference: Difference between revisions

no edit summary
(Continuing...)
No edit summary
Line 2:
:With regard to pure mathematics I suppose it is undefined. It is natural, however, to extend it by definition so that the forward difference of a list of one element is the empty list. That's how the J code resolves it, too. --[[User:TBH|TBH]] 07:31, 11 January 2008 (MST)
::I guess the FD of an empty list should just be another empty list then? These corner cases always get you. --[[User:Mwn3d|Mwn3d]] 07:39, 11 January 2008 (MST)
:::Yes, that's the way to handle receiving an empty list. (A similar "corner case" has been discussed [[Talk:Maximum_subarray|here]].) <br>One of the things I appreciate about [[J]] is how many of these exception-situations have been resolved within the language itself. In this instance both the single-element and empty-list possibilities require no specific code. --[[User:TBH|TBH]] 09:45, 11 January 2008 (MST)
It is very nice to see the [[Python]] entry. Studying it has improved my grasp of that language. --[[User:TBH|TBH]] 09:45, 11 January 2008 (MST)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.