<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: F#: Passing command line arguments to a script</title>
	<atom:link href="http://www.markhneedham.com/blog/2009/07/16/f-passing-command-line-arguments-to-a-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2009/07/16/f-passing-command-line-arguments-to-a-script/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 31 Jul 2010 12:46:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Jessica</title>
		<link>http://www.markhneedham.com/blog/2009/07/16/f-passing-command-line-arguments-to-a-script/comment-page-1/#comment-21757</link>
		<dc:creator>Jessica</dc:creator>
		<pubDate>Wed, 26 Aug 2009 23:25:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1461#comment-21757</guid>
		<description>Hi Mark,

Thought I&#039;d just point a much simpler and efficient implementation of GetArgs :)

Although efficiency isn&#039;t that important with such a small data set, it&#039;s useful to know how to do things like this better.

let rec GetArgs = function
  &#124; &quot;--&quot; :: rest -&gt; List.to_array rest
  &#124; _ :: tail -&gt; GetArgs tail
  &#124; [] -&gt; Array.empty

It also means your case of having two &quot;--&quot; works correctly too; all other &quot;--&quot; get included as actual arguments.</description>
		<content:encoded><![CDATA[<p>Hi Mark,</p>
<p>Thought I'd just point a much simpler and efficient implementation of GetArgs <img src='http://www.markhneedham.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Although efficiency isn't that important with such a small data set, it's useful to know how to do things like this better.</p>
<p>let rec GetArgs = function<br />
  | "&#8211;" :: rest -&gt; List.to_array rest<br />
  | _ :: tail -&gt; GetArgs tail<br />
  | [] -&gt; Array.empty</p>
<p>It also means your case of having two "&#8211;" works correctly too; all other "&#8211;" get included as actual arguments.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
